-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.62 KB
/
test.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
name: Java CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: '5'
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '21'
cache: 'maven'
- name: Cache NVD Database
id: cache-nvd
uses: actions/cache/restore@v4
with:
path: ~/.m2/repository/org/owasp/dependency-check-data
key: nvd-cache-${{ runner.os }}-${{ github.run_id }}
restore-keys: |
nvd-cache-${{ runner.os }}-
- name: Get Versions
run: |
echo "Google chrome version"
google-chrome --version
echo "firefox version"
firefox --version
echo "temp folder: ${{ runner.temp }}"
- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify -Djava.io.tmpdir=${{ runner.temp }}
env:
NVD_NIST_APIKEY: ${{ secrets.NVD_NIST_APIKEY}}
- name: Package artifacts
run: |
mkdir staging
cp -rf target/*.jar staging
cp -rf target/*reports staging
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Package
path: staging
overwrite: true
- name: Cache NVD Database
uses: actions/cache/save@v4
if: ${{ always() }}
with:
path: ~/.m2/repository/org/owasp/dependency-check-data
key: nvd-cache-${{ runner.os }}-${{ github.run_id }}