-
Notifications
You must be signed in to change notification settings - Fork 330
132 lines (132 loc) · 3.79 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: activescaffold/active_scaffold
on:
push:
pull_request:
concurrency:
group: "${{ github.ref }}"
cancel-in-progress: true
jobs:
lint-brakeman:
runs-on: ubuntu-latest
timeout-minutes: 60
env:
BUNDLE_CLEAN: true
BUNDLE_DEPLOYMENT: true
BUNDLE_WITHOUT: 'default deployment development production test performance'
steps:
- uses: actions/[email protected]
with:
lfs: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true
- run: bundle exec brakeman --exit-on-warn --output brakeman/index.html
- uses: actions/[email protected]
if: always()
with:
name: "${{ github.job }}"
retention-days: 1
path: brakeman
lint-bundler-audit:
runs-on: ubuntu-latest
timeout-minutes: 60
env:
BUNDLE_CLEAN: true
BUNDLE_DEPLOYMENT: true
BUNDLE_WITHOUT: 'default deployment development production test performance'
steps:
- uses: actions/[email protected]
with:
lfs: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true
- run: bundle exec bundle-audit check --update --verbose
lint-i18n:
runs-on: ubuntu-latest
timeout-minutes: 60
continue-on-error: true
env:
BUNDLE_CLEAN: true
BUNDLE_DEPLOYMENT: true
BUNDLE_WITHOUT: 'default deployment development production test performance'
steps:
- uses: actions/[email protected]
with:
lfs: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true
- run: bundle exec i18n-tasks health
lint-rubocop:
runs-on: ubuntu-latest
timeout-minutes: 60
env:
BUNDLE_CLEAN: true
BUNDLE_DEPLOYMENT: true
BUNDLE_WITHOUT: 'default deployment development production test performance'
steps:
- uses: actions/[email protected]
with:
lfs: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- run: bundle exec rubocop
test:
name: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }}
needs:
- lint-brakeman
- lint-bundler-audit
- lint-i18n
- lint-rubocop
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [ "3.2", "3.1", "3.0", "2.7", "2.6", jruby-9.4 ]
rails: [ "6.1", "6.0" ]
include:
- ruby: '2.6'
rails: '5.2'
- ruby: '2.5'
rails: '5.2'
- ruby: '3.2'
rails: '6.1'
coverage: true
timeout-minutes: 60
env:
JRUBY_OPTS: "--debug"
LC_ALL: C.UTF-8
RAILS_ENV: test
BUNDLE_GEMFILE: gemfiles/Gemfile.rails-${{ matrix.rails }}.x
BUNDLE_CLEAN: true
BUNDLE_DEPLOYMENT: true
BUNDLE_WITHOUT: 'deployment development lint production performance'
steps:
- uses: actions/[email protected]
with:
lfs: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Setup Code Climate test-reporter
if: ${{ matrix.coverage }}
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- run: COVERAGE=${{ matrix.coverage}} bundle exec rake
- run: "./cc-test-reporter after-build -t simplecov -r ${{secrets.CC_TEST_REPORTER_ID}}"
if: ${{ matrix.coverage }}
- uses: actions/[email protected]
if: success()
with:
name: "${{ github.job }}-coverage"
retention-days: 1
path: coverage