-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (49 loc) · 1.69 KB
/
analysis.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
name: Analysis
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
analyze:
name: "SonarCloud"
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
# This is needed, so SonarCloud can analyze correctly the times when regressions were introduced
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Recreate Ruby Bundler cache
uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-analysis-bundler-${{ hashFiles('**/Gemfile*') }}
restore-keys: |
${{ runner.os }}-analysis-bundler-
- name: Install dependencies
run: bundle install --path ./vendor/bundle
- name: Run tests
run: bundle exec rspec
- name: Run rubocop
run: ./bin/rubocop_changes
continue-on-error: true
- name: Prepare simplecov report
run: ./bin/simplecov_18_17 coverage/.resultset.json > coverage/.resultset17.json
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
with:
args: >
-Dsonar.organization=synyx
-Dsonar.projectKey=com.github.synyx:buchungsstreber
-Dsonar.ruby.coverage.reportPaths=/github/workspace/coverage/.resultset17.json
-Dsonar.sources=/github/workspace/bin/,/github/workspace/lib/
-Dsonar.tests=/github/workspace/spec/
-Dsonar.coverage.exclusions=**/tui.rb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}