-
Notifications
You must be signed in to change notification settings - Fork 89
135 lines (116 loc) · 3.52 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
132
133
134
135
name: SmallRye Build
on:
push:
branches:
- 'main'
- '[1-9].[0-9].x'
- '1.x'
- '!dependabot/**'
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- 'NOTICE'
- 'README*'
pull_request:
branches:
- 'main'
- '[1-9].[0-9].x'
- '1.x'
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- 'NOTICE'
- 'README*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11, 17 ]
name: build with jdk ${{matrix.java}}
steps:
- uses: actions/checkout@v3
name: checkout
- uses: actions/setup-java@v3
name: set up jdk ${{matrix.java}}
with:
distribution: 'temurin'
java-version: ${{matrix.java}}
- name: maven cache
uses: actions/cache@v3
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 -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) }}
## Attach target directories for safe Sonar scan in separate job
- name: Attach Build Output
if: matrix.java == '11'
uses: actions/upload-artifact@v3
with:
name: target
path: |
**/target/
!**/target/site/apidocs/**/*
!**/target/node/**/*
!**/target/**/*.jar
!**/target/**/*.war
javadoc:
name: verify javadocs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: checkout
- uses: actions/setup-java@v3
name: set up jdk
with:
distribution: 'temurin'
java-version: 11
- name: maven cache
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: generate javadocs
run: mvn -B package javadoc:javadoc -DskipTests
tck-reporting:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- tck-version: "2.0.1"
- tck-version: "3.0"
- tck-version: "3.1"
name: MicroProfile OpenAPI TCK ${{ matrix.tck-version }}
steps:
- uses: actions/checkout@v3
name: checkout
- uses: actions/setup-java@v3
name: set up jdk
with:
distribution: 'temurin'
java-version: 11
- name: maven cache
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: build with maven
run: mvn -B -pl '!testsuite/extra,!tools,!tools/gradle-plugin,!tools/maven-plugin,!ui,!ui/open-api-ui,!ui/open-api-ui-forms' install -DskipTests
- 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@v3
name: tck-report
with:
name: "tck-report-${{ matrix.tck-version }}"
path: "testsuite/tck/target/surefire-reports/microprofile-openapi-tck-report.html"