Repository navigation
177 lines (168 loc) · 4.82 KB
/
Copy pathmaven.yml
File metadata and controls
177 lines (168 loc) · 4.82 KB
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
name: CI
on:
push:
branches: [ "main", "master" ]
# Documentation and images cannot break a script, manifest or config:
# a change made only of these files skips validation entirely.
paths-ignore:
- '**.md'
- '**.mdx'
- '**.rst'
- '**.adoc'
- '**.pdf'
- '**.doc'
- '**.docx'
- '**.odt'
- '**.rtf'
- '**.ppt'
- '**.pptx'
- '**.odp'
- '**.png'
- '**.jpg'
- '**.jpeg'
- '**.gif'
- '**.webp'
- '**.avif'
- '**.bmp'
- '**.tif'
- '**.tiff'
- '**.ico'
- '**.svg'
pull_request:
branches: [ "main", "master" ]
# Documentation and images cannot break a script, manifest or config:
# a change made only of these files skips validation entirely.
paths-ignore:
- '**.md'
- '**.mdx'
- '**.rst'
- '**.adoc'
- '**.pdf'
- '**.doc'
- '**.docx'
- '**.odt'
- '**.rtf'
- '**.ppt'
- '**.pptx'
- '**.odp'
- '**.png'
- '**.jpg'
- '**.jpeg'
- '**.gif'
- '**.webp'
- '**.avif'
- '**.bmp'
- '**.tif'
- '**.tiff'
- '**.ico'
- '**.svg'
permissions:
contents: read
jobs:
offline-gate:
name: Offline gate (Windows, JDK 21)
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up JDK
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: 21
cache: maven
- name: Prime the exact Maven test runtime
run: mvn -B -ntp "-Dtest=quality.SmokeMethodTestHarnessTest" test --file pom.xml
- name: Run the strict offline test gate
shell: pwsh
run: .\scripts\run-offline-gate.ps1 -Goal test -StrictDependencies
category-tests:
name: Test (${{ matrix.category }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- category: smoke
groups: smoke
- category: integration
groups: integration
- category: property
groups: property
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up JDK
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: 21
cache: maven
- name: Run categorized tests
run: mvn -B test --file pom.xml -Dgroups='${{ matrix.groups }}'
verify:
name: Maven Verify (JDK ${{ matrix.java }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ '17', '21' ]
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up JDK
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: maven
- name: Build and test
run: mvn -B verify --file pom.xml
- name: Upload Surefire reports
if: matrix.java == '21'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: surefire-reports-${{ matrix.java }}
path: target/surefire-reports
retention-days: 7
- name: Upload JaCoCo report
if: matrix.java == '21'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: jacoco-report-${{ matrix.java }}
path: target/site/jacoco
if-no-files-found: warn
retention-days: 7
codecov:
name: Upload coverage to Codecov
if: github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up JDK
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: 21
cache: maven
- name: Build trusted coverage report
run: mvn -B verify --file pom.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
with:
files: target/site/jacoco/jacoco.xml
use_oidc: true
fail_ci_if_error: true
verbose: true