Skip to content

Commit

Permalink
Run CI with latest Ruby and Postgres versions (#26)
Browse files Browse the repository at this point in the history
* Run CI with latest Ruby and Postgres versions, remove duplicated job

* Bump to actions/checkout@v4
  • Loading branch information
n-rodriguez authored Oct 8, 2024
1 parent 069cf7b commit 02e2085
Showing 1 changed file with 38 additions and 12 deletions.
50 changes: 38 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby-version: ['3.2', '3.1', '3.0', '2.7', '2.6']
ruby-version: ['3.3', '3.2', '3.1', '3.0', '2.7', '2.6']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run PostgreSQL 11
run: |
docker run --env POSTGRES_USER=postgres \
Expand Down Expand Up @@ -51,6 +51,22 @@ jobs:
-d -p 5436:5432 postgres:15.1-alpine \
postgres -c shared_preload_libraries=pg_stat_statements
sleep 15
- name: Run PostgreSQL 16
run: |
docker run --env POSTGRES_USER=postgres \
--env POSTGRES_DB=ruby-pg-extras-test \
--env POSTGRES_PASSWORD=secret \
-d -p 5437:5432 postgres:16.4-alpine \
postgres -c shared_preload_libraries=pg_stat_statements
sleep 15
- name: Run PostgreSQL 17
run: |
docker run --env POSTGRES_USER=postgres \
--env POSTGRES_DB=ruby-pg-extras-test \
--env POSTGRES_PASSWORD=secret \
-d -p 5438:5432 postgres:17.0-alpine \
postgres -c shared_preload_libraries=pg_stat_statements
sleep 15
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
Expand All @@ -74,16 +90,6 @@ jobs:
DATABASE_URL: postgresql://postgres:secret@localhost:5432/ruby-pg-extras-test
run: |
bundle exec rspec spec/
- name: Run tests for PG 11
env:
PG_VERSION: 11
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
POSTGRES_DB: ruby-pg-extras-test
POSTGRES_PASSWORD: secret
DATABASE_URL: postgresql://postgres:secret@localhost:5432/ruby-pg-extras-test
run: |
bundle exec rspec spec/
- name: Run tests for PG 12
env:
PG_VERSION: 12
Expand Down Expand Up @@ -124,4 +130,24 @@ jobs:
DATABASE_URL: postgresql://postgres:secret@localhost:5436/ruby-pg-extras-test
run: |
bundle exec rspec spec/
- name: Run tests for PG 16
env:
PG_VERSION: 16
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
POSTGRES_DB: ruby-pg-extras-test
POSTGRES_PASSWORD: secret
DATABASE_URL: postgresql://postgres:secret@localhost:5437/ruby-pg-extras-test
run: |
bundle exec rspec spec/
- name: Run tests for PG 17
env:
PG_VERSION: 17
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
POSTGRES_DB: ruby-pg-extras-test
POSTGRES_PASSWORD: secret
DATABASE_URL: postgresql://postgres:secret@localhost:5438/ruby-pg-extras-test
run: |
bundle exec rspec spec/

0 comments on commit 02e2085

Please sign in to comment.