-
Notifications
You must be signed in to change notification settings - Fork 24
37 lines (37 loc) · 1.04 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: CI
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
pg:
- 12
- 13
- 14
- 15
- 16
ruby:
- "3.1"
- "3.2"
- "3.3"
gemfile:
- rails_6.1
- rails_7.0
- rails_7.1
- rails_7.2
name: PostgreSQL ${{ matrix.pg }} - Ruby ${{ matrix.ruby }} - ${{ matrix.gemfile }}
runs-on: ubuntu-latest
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v3
- name: Build postgres image and start the container
run: docker-compose up -d --build
env:
PGVERSION: ${{ matrix.pg }}
- name: Setup Ruby using .ruby-version file
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle exec rake spec