-
Notifications
You must be signed in to change notification settings - Fork 19
74 lines (71 loc) · 2.07 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
69
70
71
72
73
74
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
- run: bin/yarn install
- run: bin/rake lint
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- '2.7'
- '3.0'
- '3.1'
rails:
- '5.2'
- '6.0'
- '6.1'
- '7.0'
- 'main'
exclude:
# Rails 5.2 will not receive support for Ruby 3 (https://github.com/rails/rails/issues/40938):
- { ruby: '3.0', rails: '5.2' }
- { ruby: '3.1', rails: '5.2' }
# Rails 7.1 will not support Ruby 2.7 (https://edgeguides.rubyonrails.org/7_1_release_notes.html):
- { ruby: '2.7', rails: 'main' }
name: Test (Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }})
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}.gemfile
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
- run: bin/yarn install
- uses: nanasess/setup-chromedriver@v1
- uses: aktions/codeclimate-test-reporter@v1
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
codeclimate-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }}
command: before-build
- run: bin/rake test
- uses: aktions/codeclimate-test-reporter@v1
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
codeclimate-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }}
command: after-build