-
Notifications
You must be signed in to change notification settings - Fork 4
75 lines (71 loc) · 2.56 KB
/
main.yml
File metadata and controls
75 lines (71 loc) · 2.56 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
68
69
70
71
72
73
74
75
name: Ruby
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
permissions:
contents: read
id-token: write
strategy:
matrix:
ruby: ["2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "4.0", head]
steps:
- uses: actions/checkout@v4
- 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 == '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 == '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' && !github.base_ref }}
with:
oidc: true
files: coverage/.resultset.json
standard:
name: Run standard
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4"
- name: Setup project
run: bundle install
- name: Rake standard
run: bundle exec rake standard