-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (46 loc) · 1.4 KB
/
static-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
name: Static Analysis
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
static-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup RgGen env variables
run: |
echo "RGGEN_ROOT=${GITHUB_WORKSPACE}" >> ${GITHUB_ENV}
echo "RGGEN_REPOSITORY=${GITHUB_REPOSITORY#rggen/}" >> ${GITHUB_ENV}
echo "RGGEN_BRANCH=${GITHUB_REF#refs/heads/}" >> ${GITHUB_ENV}
- name: Checkout RgGen devtools
uses: actions/checkout@v4
with:
repository: rggen/rggen-devtools
path: rggen-devtools
fetch-depth: 0
- name: Checkout RgGen library list
uses: actions/checkout@v4
with:
repository: rggen/rggen-checkout
path: rggen-checkout
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
env:
BUNDLE_WITHOUT: rggen:test
- name: Run Rubocop
run: |
bundle exec rubocop --format json --out rubocop.json --config .rubocop.yml lib || :
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}