-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.15 KB
/
ruby.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
name: ruby
on:
push:
branches:
- master
paths:
- '**.rb'
- '**/**.rb'
- '**/**/**.rb'
pull_request:
paths:
- '**.rb'
- '**/**.rb'
- '**/**/**.rb'
jobs:
ruby:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Install rspec
run: gem install rspec -v 3.12.0
- name: Run rspec tests
run: rake
- name: Install rubocop
run: gem install rubocop -v '~> 1.9.1'
- name: Check Rubocop
run: rubocop
- name: Install Code Scanning integration
run: bundle add code-scanning-rubocop --skip-install
- name: Install dependencies
run: bundle install
- name: Run code scan
run: |
bash -c "
bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif
[[ $? -ne 2 ]]
"
- name: Upload Sarif output
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: rubocop.sarif