-
Notifications
You must be signed in to change notification settings - Fork 31
67 lines (64 loc) · 2.64 KB
/
Copy pathci.yml
File metadata and controls
67 lines (64 loc) · 2.64 KB
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
name: Ruby
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }} (transitions=${{ matrix.transitions }})
permissions:
contents: read
strategy:
fail-fast: false
matrix:
ruby: ["2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "4.0", head]
transitions: ["true", "false"]
env:
ENABLE_TRANSITIONS: ${{ matrix.transitions }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install bundler
run: gem install bundler -v 2.4.22
if: ${{ matrix.ruby == '2.7' || matrix.ruby == '3.0' }}
- name: Bundle install
run: bundle install
- name: Setup project
run: bundle exec appraisal install
- name: Run tests for Rails 6.0
run: bundle exec appraisal rails-6-0 rake test
if: ${{ matrix.ruby == '2.7' || matrix.ruby == '3.0' }}
- name: Run tests for Rails 6.1
run: bundle exec appraisal rails-6-1 rake test
if: ${{ matrix.ruby == '2.7' || matrix.ruby == '3.0' }}
- name: Run tests for Rails 7.0
run: bundle exec appraisal rails-7-0 rake test
if: ${{ matrix.ruby == '2.7' || matrix.ruby == '3.0' || matrix.ruby == '3.1' || matrix.ruby == '3.2' || matrix.ruby == '3.3' }}
- name: Run tests for Rails 7.1
run: bundle exec appraisal rails-7-1 rake test
if: ${{ matrix.ruby == '2.7' || matrix.ruby == '3.0' || matrix.ruby == '3.1' || matrix.ruby == '3.2' || matrix.ruby == '3.3' }}
- name: Run tests for Rails 7.2
run: bundle exec appraisal rails-7-2 rake test
if: ${{ matrix.ruby == '3.1' || matrix.ruby == '3.2' || matrix.ruby == '3.3' || matrix.ruby == '3.4' }}
- name: Run tests for Rails 8.0
run: bundle exec appraisal rails-8-0 rake test
if: ${{ matrix.ruby == '3.2' || matrix.ruby == '3.3' || matrix.ruby == '3.4' }}
- name: Run tests for Rails 8.1
run: bundle exec appraisal rails-8-1 rake test
if: ${{ matrix.ruby == '3.3' || matrix.ruby == '3.4' || matrix.ruby == '4.0' }}
- name: Run tests for Rails edge
run: bundle exec appraisal rails-edge rake test
if: ${{ matrix.ruby == '4.0' || matrix.ruby == 'head' }}
- name: Upload coverage to Qlty
uses: qltysh/qlty-action/coverage@v2
if: ${{ matrix.ruby == '3.4' && matrix.transitions == 'true' && !github.base_ref }}
with:
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
files: coverage/.resultset.json