Skip to content

Add a GitHub Actions workflow to run the test suite #5

Add a GitHub Actions workflow to run the test suite

Add a GitHub Actions workflow to run the test suite #5

Workflow file for this run

---
name: tests
on: [ push, pull_request ]
jobs:
test:
name: Test (Ruby ${{ matrix.ruby }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [ '3.2', '3.1', '3.0' ]
steps:
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: RSpec
run: bundle exec rspec
env:
DATABASE_URL: postgres://postgres:secretdb@localhost:25432/event_sourcery_todo_app_test
services:
postgres:
image: postgres
env:
POSTGRES_DB: event_sourcery_todo_app_test
POSTGRES_PASSWORD: secretdb
ports:
- 25432:5432