-
Notifications
You must be signed in to change notification settings - Fork 2
130 lines (125 loc) · 4.02 KB
/
ci-pr.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: CI - PR
on:
- pull_request
jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Setup Java JDK"
uses: actions/[email protected]
with:
java-version: 17
distribution: adopt
- name: Kotlin Linter
uses: eskatos/gradle-command-action@d1b726d8c1e0cc120447ad1a950d6e6794c51ad8
with:
arguments: ktlintCheck
- name: Checkstyle Linter
uses: eskatos/gradle-command-action@d1b726d8c1e0cc120447ad1a950d6e6794c51ad8
with:
arguments: checkstyleMain
- name: PMD Linter
uses: eskatos/gradle-command-action@d1b726d8c1e0cc120447ad1a950d6e6794c51ad8
with:
arguments: pmdMain
- uses: jwgmeligmeyling/checkstyle-github-action@master
if: github.actor != 'dependabot[bot]'
with:
path: '**/checkstyle/main.xml'
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@master
if: github.actor != 'dependabot[bot]'
with:
tool: spotbugs
project-token: ${{ secrets.CODACY_TOKEN }}
upload: true
max-allowed-issues: 2147483647
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Setup Java JDK"
uses: actions/[email protected]
with:
java-version: 17
distribution: adopt
- name: Unit Tests
uses: eskatos/gradle-command-action@d1b726d8c1e0cc120447ad1a950d6e6794c51ad8
with:
arguments: test
- name: Codacy Publish
uses: codacy/codacy-coverage-reporter-action@master
if: github.actor != 'dependabot[bot]'
with:
project-token: ${{ secrets.CODACY_TOKEN }}
javadoc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Setup Java JDK"
uses: actions/[email protected]
with:
java-version: 17
distribution: adopt
- name: Generate javadoc
uses: eskatos/gradle-command-action@d1b726d8c1e0cc120447ad1a950d6e6794c51ad8
with:
arguments: globalJavadoc
documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: pip3 install -r requirements.txt
- run: mkdocs build -d build/site/
- name: Upload artifact
uses: actions/[email protected]
with:
name: "Website"
path: "build/site/"
owasp:
name: "OWASP check"
runs-on: ubuntu-latest
timeout-minutes: 30
concurrency:
group: "owasp-check-${{ github.ref }}"
cancel-in-progress: true
steps:
- name: "Checkout Code"
uses: actions/checkout@v4
- name: "Setup Java JDK"
uses: actions/[email protected]
with:
java-version: 17
distribution: adopt
- name: Cache Dependency Database
uses: actions/cache@v3
with:
path: "~/.gradle/dependency-check-data/"
key: "owasp-check"
- name: "Execute dependencyCheckUpdate"
uses: eskatos/gradle-command-action@d1b726d8c1e0cc120447ad1a950d6e6794c51ad8
continue-on-error: true
with:
arguments: dependencyCheckUpdate
- name: "Execute dependencyCheckAnalyze"
uses: eskatos/gradle-command-action@d1b726d8c1e0cc120447ad1a950d6e6794c51ad8
continue-on-error: true
with:
arguments: dependencyCheckAnalyze
- id: "eval"
name: "Evaluate OWASP report"
uses: raynigon/gradle-owasp-parser@main
with:
fail_on_vulnerabilities: "true"
path_report: "build/reports/dependency-check-report.json"
path_build_gradle: "build.gradle"
- name: Add comment to PR
if: ${{ failure() }}
uses: thollander/actions-comment-pull-request@v2
with:
message: "${{ steps.eval.outputs.report_markdown }}"
comment_tag: 'Comment-ID: owasp-report-${{ github.ref }}'