-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.74 KB
/
ci.yml
File metadata and controls
60 lines (48 loc) · 1.74 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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
env:
RAILS_ENV: test
CI: true
steps:
- name: display environment vars
run: env
- name: Checkout
uses: actions/checkout@v2
- name: Set up Ruby 2.6.6, install our version of bundler and cache the gems
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.6
bundler: 2.1.4
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run bundler-audit
run: bundle exec bundle-audit update; bundle exec bundle-audit check
- name: Run Tests
run: bundle exec rake test
- name: publish coverage reports
uses: 5monkeys/cobertura-action@master
with:
path: ./coverage/coverage.xml
minimum_coverage: 7
repo_token: ${{ secrets.CI_COBERTURA_REPORTS }}
# - name: TODO - flog complexity report
# - name: Post result to slack
# uses: 8398a7/action-slack@v3
# with:
# status: ${{ job.status }}
# fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
# if: always() # Pick up events even if the job fails or is canceled.