-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (44 loc) · 1.46 KB
/
windows-maven.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
name: 'Windows Maven build'
env:
MAVEN_OPTS: -Djava.awt.headless=true
MAVEN_VERSION: '3.9.9'
concurrency:
group: ${{ github.workflow }}-${{ ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release' ) && format('ci-main-{0}', github.sha) || format('ci-main-{0}', github.ref) }}
cancel-in-progress: true
on:
pull_request:
jobs:
build:
name: 'Build w/ Java 17'
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: 'Set up JDK'
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- name: 'Set up Maven'
uses: stCarolas/setup-maven@v5
with:
maven-version: ${{ env.MAVEN_VERSION }}
- name: 'Priming build'
run: |
mvn --% install -DskipTests -DskipITs -B -V -fae
- name: 'Test with Maven'
run: |
mvn --% -e -fae -B clean test
- name: 'Upload coverage to Codecov'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: 'Upload test results to Codecov'
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: target/surefire-reports/TEST-*.xml
- name: 'Cleanup build artifacts and snapshots'
run: |
cmd --% /c for /f %i in ('dir /a:d /s /b %userprofile%\*SNAPSHOT*') do rd /s /q %i