-
-
Notifications
You must be signed in to change notification settings - Fork 909
68 lines (66 loc) · 1.89 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
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
name: Test
on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
types:
- opened
- synchronize
paths-ignore:
- '**.md'
jobs:
build:
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
ports: [ '5432:5432' ]
options: --health-cmd pg_isready --health-interval 2s --health-timeout 1s --health-retries 10
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- 3.3.0
- 3.2.2
- 3.1.4
- 3.0.6
appraisal:
- rails_7_2
- rails_7_1
- rails_7_0
- rails_6_1
adapter:
- sqlite3
- postgresql
exclude:
- { ruby: 3.3.0, appraisal: rails_6_1 }
- { ruby: 3.3.0, appraisal: rails_7_0 }
- { ruby: 3.2.2, appraisal: rails_6_1 }
- { ruby: 3.0.6, appraisal: rails_7_0 }
- { ruby: 3.0.6, appraisal: rails_7_1 }
- { ruby: 3.0.6, appraisal: rails_7_2 }
env:
DATABASE_ADAPTER: ${{ matrix.adapter }}
BUNDLE_GEMFILE: gemfiles/${{ matrix.appraisal }}.gemfile
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
id: set-up-ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- uses: actions/cache@v3
with:
path: vendor/bundle
key: v1-rubygems-local-${{ runner.os }}-${{ matrix.ruby }}-${{ hashFiles(format('gemfiles/{0}.gemfile.lock', matrix.appraisal)) }}
- name: Install dependencies
run: bundle install --jobs=3 --retry=3
- name: Run Unit Tests
run: RUBYOPT='--enable=frozen-string-literal' bundle exec rake spec:unit --trace
- name: Run Acceptance Tests
run: RUBYOPT='--enable=frozen-string-literal' bundle exec rake spec:acceptance --trace