forked from oss-review-toolkit/ort
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (69 loc) · 1.77 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Static Analysis
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
detekt-issues:
runs-on: ubuntu-22.04
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: gradle
- name: Check for Detekt Issues
uses: burrunan/gradle-cache-action@v1
with:
arguments: --stacktrace detekt
- name: Upload SARIF File
uses: github/codeql-action/upload-sarif@v2
if: ${{ always() }} # Upload even if the previous step failed.
with:
sarif_file: build/reports/detekt/detekt.sarif
markdown-links:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Check Links
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
base-branch: main
check-modified-files-only: yes
max-depth: 2
use-quiet-mode: yes
qodana-scan:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Qodana Scan
uses: JetBrains/qodana-action@v2022.2.1
- uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{runner.temp}}/qodana/results/qodana.sarif.json
reuse-tool:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: pip
- name: Check REUSE Compliance
run: |
pip install --user reuse
~/.local/bin/reuse lint