-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 1.97 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
name: CI
on: push
jobs:
test:
name: CI Ruby ${{ matrix.ruby-version }} AR ${{ matrix.activerecord-version }}
runs-on: ubuntu-latest
strategy:
max-parallel: 2
fail-fast: false
matrix:
ruby-version: ['2.6.10', '2.7.8', '3.0.6', '3.1.4', '3.2.2']
activerecord-version: ['5.0', '5.1', '5.2', '6.0', '6.1', '7.0', '7.1']
exclude:
# Rails 7's gemspec requires ruby >= 2.7
- ruby-version: '2.6.10'
activerecord-version: '7.0'
- ruby-version: '2.6.10'
activerecord-version: '7.1'
# Rails 5.x is unlikely ever to support ruby >= 3.0
# https://github.com/rails/rails/issues/40938#issuecomment-751569171
- ruby-version: '3.0.6'
activerecord-version: '5.0'
- ruby-version: '3.0.6'
activerecord-version: '5.1'
- ruby-version: '3.0.6'
activerecord-version: '5.2'
- ruby-version: '3.1.4'
activerecord-version: '5.0'
- ruby-version: '3.1.4'
activerecord-version: '5.1'
- ruby-version: '3.1.4'
activerecord-version: '5.2'
- ruby-version: '3.2.2'
activerecord-version: '5.0'
- ruby-version: '3.2.2'
activerecord-version: '5.1'
- ruby-version: '3.2.2'
activerecord-version: '5.2'
steps:
- name: Cleanup
uses: Automodality/action-clean@v1
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: docker compose build --build-arg ruby_version=${{ matrix.ruby-version }} --build-arg activerecord_version=${{ matrix.activerecord-version }}
- name: Run standardrb
run: docker compose run --rm --no-deps app bash --login -c 'bundle exec standardrb'
- name: Run rubocop
run: docker compose run --rm --no-deps app bash --login -c 'bundle exec rubocop'
- name: Run tests
run: docker compose run --rm app bash --login -c 'bundle exec rake'