-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (43 loc) · 1.21 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
name: CI
on:
push:
branches: [main]
pull_request:
schedule:
- cron: '0 0 * * 0'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
rails_version: [6.1.0, 7.0.0, 7.1.0, 7.2.0, 8.0.0, main]
ruby_version: ['3.4', '3.3', '3.2', '3.1']
exclude:
- { ruby_version: '3.1', rails_version: main }
- { ruby_version: '3.1', rails_version: 8.0.0 }
- { ruby_version: '3.4', rails_version: 6.1.0 }
- { ruby_version: '3.4', rails_version: 7.0.0 }
steps:
- uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby_version }}"
- name: Run test
env:
RAILS_VERSION: "${{ matrix.rails_version }}"
run: |
gem update --system
bundle update
cd spec/dummy; rake db:migrate db:test:prepare; cd ../..
bundle exec rake
- name: Upload coverage
uses: actions/upload-artifact@v4
if: always()
with:
name: "coverage-ruby-${{ matrix.ruby_version }}-rails-${{ matrix.rails_version }}"
path: coverage
- name: Show coverage
if: always()
run: |
cat coverage/coverage.txt