-
Notifications
You must be signed in to change notification settings - Fork 103
156 lines (137 loc) · 4.29 KB
/
Copy pathbuild.yml
File metadata and controls
156 lines (137 loc) · 4.29 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
name: SmallRye Build
on:
push:
branches:
- 'main'
- 'main-[1-9].[0-9]'
- '[1-9].[0-9].x'
- '1.x'
- '!dependabot/**'
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- 'NOTICE'
- 'README*'
pull_request:
branches:
- 'main'
- 'main-[1-9].[0-9]'
- '[1-9].[0-9].x'
- '1.x'
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- 'NOTICE'
- 'README*'
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
java:
- 17
- 21
runs-on: ${{ matrix.os }}
name: build with jdk ${{matrix.java}} (${{ matrix.os }})
steps:
- uses: actions/checkout@v6
name: checkout
- uses: actions/setup-java@v5
name: set up jdk ${{matrix.java}}
with:
distribution: 'temurin'
java-version: ${{matrix.java}}
- name: maven cache
uses: actions/cache@v5
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: build with maven
run: mvn -B formatter:validate impsort:check install javadoc:javadoc -Pcoverage -Pgradle-smoke-test
## Store information about the build context for Sonar scan in separate job
- name: Save Build Context
run: echo "$GITHUB_CONTEXT" > target/build-context.json
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
## ! Remove this step in a follow-up PR
## Copy aggregrate coverage report to the testsuite/extra project where it is expected by sonar.yml
- name: copy coverage report (temporary)
run: cp -R testsuite/coverage/target/site testsuite/extra/target
## Attach target directories for safe Sonar scan in separate job
- name: Attach Build Output
if: ${{ matrix.java == '17' && matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v6
with:
name: target
path: |
**/target/
!**/target/site/apidocs/**/*
!**/target/node/**/*
!**/target/**/*.jar
!**/target/**/*.war
!**/target/failsafe-reports/**/*
!**/target/surefire-reports/**/*
!**/target/maven-it/**/*
- name: Archive Failed Tests Results
uses: actions/upload-artifact@v6
if: failure()
with:
name: artifacts-${{ matrix.os }}-java${{matrix.java}}
path: |
**/target/failsafe-reports/
**/target/surefire-reports/
tck-reporting:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java:
- 11
- 17
- 21
tck-version:
- "4.0.2"
- "4.1.1"
include:
# Disable older TCK jobs prior to 4.0 GA release
#- tck-version: "2.0.1"
#- tck-version: "3.0"
#- tck-version: "3.1.1"
- title: "4.0.x"
tck-version: "4.0.2"
- title: "4.1.x"
tck-version: "4.1.1"
name: MicroProfile OpenAPI TCK ${{ matrix.title }} with jdk ${{ matrix.java }}
steps:
- uses: actions/checkout@v6
name: checkout
- name: maven cache
uses: actions/cache@v5
with:
path: ~/.m2
key: ${{ runner.os }}-m2-tck-${{ matrix.tck-version }}-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- uses: actions/setup-java@v5
name: set up jdk
with:
distribution: 'temurin'
java-version: 17
- name: build with maven
run: mvn -B install -pl 'testsuite/tck' -am -DskipTests
- uses: actions/setup-java@v5
name: set up jdk
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: execute tck ${{ matrix.tck-version }}
run: mvn -B test -f testsuite/tck/pom.xml -Dsmallrye.commit=$(git rev-parse HEAD) -Dversion.eclipse.microprofile.openapi=${{ matrix.tck-version }}
- uses: actions/upload-artifact@v6
name: tck-report
with:
name: "tck-report-${{ matrix.tck-version }}-jdk${{ matrix.java }}"
path: "testsuite/tck/target/surefire-reports/microprofile-openapi-tck-report.html"