add github workflows #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
push: | |
jobs: | |
rspec: | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby_version: ["2.6", "2.7", "3.0"] | |
postgres-version: ["12", "13", "14", "15", "16"] | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:${{ matrix.postgres-version }} | |
env: | |
POSTGRES_DB: que-test | |
POSTGRES_USER: ubuntu | |
POSTGRES_PASSWORD: password | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 10 | |
lock_database: | |
image: postgres:${{ matrix.postgres-version }} | |
env: | |
POSTGRES_DB: lock-test | |
POSTGRES_USER: ubuntu | |
POSTGRES_PASSWORD: password | |
ports: | |
- 5434:5434 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 10 | |
env: | |
PGDATABASE: que-test | |
PGUSER: ubuntu | |
PGPASSWORD: password | |
PGHOST: localhost | |
LOCK_PGDATABASE: lock-test | |
LOCK_PGUSER: ubuntu | |
LOCK_PGPASSWORD: password | |
LOCK_PGHOST: localhost | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
ruby-version: "${{ matrix.ruby-version }}" | |
- name: Run specs | |
run: | | |
bundle exec rspec |