-
Notifications
You must be signed in to change notification settings - Fork 10
43 lines (39 loc) · 1.18 KB
/
build.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
name: build
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Java ${{matrix.java-version}}
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: ${{matrix.java-version}}
- name: Run tests
run: ./mvnw --batch-mode --no-transfer-progress -e test
coverage:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create code coverage report
run: ./mvnw --batch-mode --no-transfer-progress -e test jacoco:report
- name: Upload code coverage report
uses: codecov/codecov-action@v4
with:
files: target/site/jacoco/jacoco.xml
name: codecov
dependency-check:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check dependencies
run: ./mvnw --batch-mode --no-transfer-progress -e dependency-check:check -DnvdApiKey='${{ secrets.NVD_API_KEY }}'