forked from eXist-db/exist
-
Notifications
You must be signed in to change notification settings - Fork 2
86 lines (86 loc) · 3.22 KB
/
ci-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
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
name: Test & documentation
on: [push, pull_request]
permissions:
contents: read
env:
MAVEN_OPTS: -DtrimStackTrace=false -D'maven.resolver.transport=wagon'
DEV_JDK: '17'
jobs:
license:
name: License check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: liberica
java-version: ${{ env.DEV_JDK }}
cache: 'maven'
- run: mvn -V -B license:check
timeout-minutes: 60
dependencies:
name: Dependency checks
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/develop' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: liberica
java-version: ${{ env.DEV_JDK }}
cache: 'maven'
- name: OWASP dependency check
env:
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
run: mvn -V -B dependency-check:check
timeout-minutes: 60
test:
name: ${{ matrix.os }} Test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
jvm: ['17', '21']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: liberica
java-version: ${{ matrix.jvm }}
cache: 'maven'
- name: Install Maven Daemon
id: install-mvnd
uses: ./.github/actions/install-mvnd
with:
version: '1.0.2'
file-version-suffix: ''
cache: 'true'
- name: Maven Build
timeout-minutes: 10
run: ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd -V -B -T 1C compile test-compile -DtrimStackTrace=false -D'dependency-check.skip' -D'license.skip'
- name: Maven Test
timeout-minutes: 60
run: ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd -V -B verify -DtrimStackTrace=false -D'dependency-check.skip' -D'license.skip' -D'mvnd.maxLostKeepAlive=6000'
- name: Javadoc (Linux only)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd -V -B -q -T 1C install javadoc:javadoc -DskipTests -D'dependency-check.skip' -D'license.skip' --projects '!exist-distribution,!exist-installer' --also-make
- name: Maven Code Coverage (Develop branch on Linux only)
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/develop' && matrix.os == 'ubuntu-latest' }}
env:
CI_NAME: github
BRANCH_NAME_OR_REF: ${{ github.head_ref || github.ref }}
CI_BUILD_NUMBER: ${{ github.run_id }}
CI_BUILD_URL: https://github.com/${{ github.repository }}/commit/${{ github.event.after }}/checks
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
run: ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd -V -B jacoco:report coveralls:report
- name: Archive build logs
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-${{ matrix.jvm }}-build-logs
retention-days: 5
path: |
**/hs_err_pid*.log
**/target/surefire-reports/*