-
Notifications
You must be signed in to change notification settings - Fork 21
88 lines (79 loc) · 2.47 KB
/
ruby.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Ruby specs
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
test:
name: Ruby specs
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.0', '3.1', '3.2', '3.3']
gemfile: [rails_7.0, rails_7.1, rails_7.2, rails_8.0]
postgres-version: ['16']
channel: ['stable']
include:
# Test minimum required Ruby and Rails against PostgreSQL 12
- ruby-version: '3.0'
gemfile: rails_7.0
postgres-version: '12'
channel: 'stable'
- ruby-version: '3.2'
gemfile: rails_edge
postgres-version: '16'
channel: 'experimental'
- ruby-version: '3.3'
gemfile: rails_edge
postgres-version: '16'
channel: 'experimental'
- ruby-version: 'head'
gemfile: rails_7.1
postgres-version: '16'
channel: 'experimental'
- ruby-version: 'head'
gemfile: rails_7.2
postgres-version: '16'
channel: 'experimental'
- ruby-version: 'head'
gemfile: rails_8.0
postgres-version: '16'
channel: 'experimental'
- ruby-version: 'head'
gemfile: rails_edge
postgres-version: '16'
channel: 'experimental'
exclude:
- ruby-version: '3.0'
gemfile: rails_7.2
- ruby-version: '3.0'
gemfile: rails_8.0
- ruby-version: '3.1'
gemfile: rails_8.0
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
TEST_CONFIG: ./spec/config.github.yml
continue-on-error: ${{ matrix.channel != 'stable' }}
steps:
- uses: actions/checkout@v4
- uses: ankane/setup-postgres@v1
with:
postgres-version: ${{ matrix.postgres-version }}
database: chronomodel
- name: Create Rails app database # FIXME: refactor when ankane/setup-postgres#9 will be merged
run: |
createdb chronomodel_railsapp
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run specs and publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: dedfb7472ee410eec459bff3681d9a8fd8dd237e9bd7e8675a7c8eb7e253bba9
with:
coverageCommand: bundle exec rake