-
Notifications
You must be signed in to change notification settings - Fork 8
60 lines (58 loc) · 1.73 KB
/
specs.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
name: All Specs
on: [push, pull_request]
jobs:
specs:
name: CI
runs-on: ubuntu-latest
continue-on-error: true
services:
postgres:
image: postgres:13
env:
POSTGRES_PASSWORD: password
ports:
- 5432:5432
strategy:
matrix:
suite: [cucumber, rspec]
env:
DB_USER: postgres
TZ: America/Los_Angeles
RAILS_ENV: test
RUBY_ENV: test
DISPLAY: ':99' # For chromedriver
CCTR: ./cc-test-reporter
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14.17.0'
- name: Use Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.7
bundler-cache: true
- name: Setup Code Climate
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > $CCTR
chmod +x $CCTR
$CCTR before-build
- run: bin/yarn
- run: bin/rails webpacker:compile
- run: bundle exec rake db:setup
- run: bundle exec rake db:migrate
- name: Run ${{ matrix.suite }}
run: |
bundle exec ${{ matrix.suite }}
$CCTR format-coverage --output coverage/codeclimate.${{ matrix.suite }}.json --input-type simplecov
- name: CodeCov Coverage
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Publish Code Climate
run: |
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
$CCTR sum-coverage coverage/codeclimate.*.json
$CCTR upload-coverage --id $CC_TEST_REPORTER_ID