-
Notifications
You must be signed in to change notification settings - Fork 14
111 lines (109 loc) · 3.84 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
name: CI
on: [push, pull_request]
jobs:
build:
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
runs-on: ubuntu-latest
strategy:
matrix:
gemfile: [rails_5_2.gemfile, rails_6_0.gemfile, rails_6_1.gemfile, rails_7_0.gemfile, rails_7_1.gemfile, rails_7_2.gemfile, rails_main.gemfile]
ruby_version: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3']
exclude:
- gemfile: rails_main.gemfile
ruby_version: '2.3'
- gemfile: rails_main.gemfile
ruby_version: '2.4'
- gemfile: rails_main.gemfile
ruby_version: '2.5'
- gemfile: rails_main.gemfile
ruby_version: '2.6'
- gemfile: rails_main.gemfile
ruby_version: '2.7'
- gemfile: rails_main.gemfile
ruby_version: '3.0'
- gemfile: rails_main.gemfile
ruby_version: '3.1'
- gemfile: rails_7_2.gemfile
ruby_version: '2.3'
- gemfile: rails_7_2.gemfile
ruby_version: '2.4'
- gemfile: rails_7_2.gemfile
ruby_version: '2.5'
- gemfile: rails_7_2.gemfile
ruby_version: '2.6'
- gemfile: rails_7_2.gemfile
ruby_version: '2.7'
- gemfile: rails_7_2.gemfile
ruby_version: '3.0'
- gemfile: rails_7_1.gemfile
ruby_version: '2.3'
- gemfile: rails_7_1.gemfile
ruby_version: '2.4'
- gemfile: rails_7_1.gemfile
ruby_version: '2.5'
- gemfile: rails_7_1.gemfile
ruby_version: '2.6'
- gemfile: rails_7_0.gemfile
ruby_version: '2.3'
- gemfile: rails_7_0.gemfile
ruby_version: '2.4'
- gemfile: rails_7_0.gemfile
ruby_version: '2.5'
- gemfile: rails_7_0.gemfile
ruby_version: '2.6'
- gemfile: rails_6_1.gemfile
ruby_version: '2.3'
- gemfile: rails_6_1.gemfile
ruby_version: '2.4'
- gemfile: rails_6_1.gemfile
ruby_version: '3.1'
- gemfile: rails_6_1.gemfile
ruby_version: '3.2'
- gemfile: rails_6_1.gemfile
ruby_version: '3.3'
- gemfile: rails_6_0.gemfile
ruby_version: '2.3'
- gemfile: rails_6_0.gemfile
ruby_version: '2.4'
- gemfile: rails_6_0.gemfile
ruby_version: '3.0'
- gemfile: rails_6_0.gemfile
ruby_version: '3.1'
- gemfile: rails_6_0.gemfile
ruby_version: '3.2'
- gemfile: rails_6_0.gemfile
ruby_version: '3.3'
- gemfile: rails_5_2.gemfile
ruby_version: '3.0'
- gemfile: rails_5_2.gemfile
ruby_version: '3.1'
- gemfile: rails_5_2.gemfile
ruby_version: '3.2'
- gemfile: rails_5_2.gemfile
ruby_version: '3.3'
env:
BUNDLE_GEMFILE: spec/gemfiles/${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Before build
run: |
sudo apt-get install libsqlite3-dev
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
env:
CC_TEST_REPORTER_ID: aff2c7b9e07e54d5fc9e5588d2e2a8bab4f69950d35000edc2b6250bbaba477d
- name: Run test
run: |
bundle exec rake code_analysis
bundle exec rspec
- name: Report to CodeClimate
run: |
./cc-test-reporter after-build --exit-code 0
env:
CC_TEST_REPORTER_ID: aff2c7b9e07e54d5fc9e5588d2e2a8bab4f69950d35000edc2b6250bbaba477d