-
Notifications
You must be signed in to change notification settings - Fork 89
131 lines (114 loc) · 3.75 KB
/
build.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
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
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:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17, 21 ]
name: build with jdk ${{matrix.java}}
steps:
- uses: actions/checkout@v4
name: checkout
- uses: actions/setup-java@v4
name: set up jdk ${{matrix.java}}
with:
distribution: 'temurin'
java-version: ${{matrix.java}}
- name: maven cache
uses: actions/cache@v4
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'
uses: actions/upload-artifact@v4
with:
name: target
path: |
**/target/
!**/target/site/apidocs/**/*
!**/target/node/**/*
!**/target/**/*.jar
!**/target/**/*.war
!**/target/failsafe-reports/**/*
!**/target/surefire-reports/**/*
!**/target/maven-it/**/*
tck-reporting:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
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"
- tck-version: "4.0.1"
name: MicroProfile OpenAPI TCK ${{ matrix.tck-version }}
steps:
- uses: actions/checkout@v4
name: checkout
- name: maven cache
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-tck-${{ matrix.tck-version }}-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- uses: actions/setup-java@v4
name: set up jdk
with:
distribution: 'temurin'
java-version: 17
- name: build with maven
run: mvn -B install -pl '!testsuite/coverage,!testsuite/data,!testsuite/extra,!tools,!tools/gradle-plugin,!tools/maven-plugin,!ui,!ui/open-api-ui,!ui/open-api-ui-forms' -DskipTests
- uses: actions/setup-java@v4
name: set up jdk
with:
distribution: 'temurin'
java-version: 11
- 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@v4
name: tck-report
with:
name: "tck-report-${{ matrix.tck-version }}"
path: "testsuite/tck/target/surefire-reports/microprofile-openapi-tck-report.html"