-
Notifications
You must be signed in to change notification settings - Fork 212
158 lines (131 loc) · 4.71 KB
/
build-workflow.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java pipeline
on:
push:
branches:
- develop
pull_request:
branches: [ develop ]
env:
MAVEN_OPTS: >-
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
-Didea.ignore.disabled.plugins=true
-Didea.home.path=/tmp"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-env:
runs-on: ubuntu-latest
outputs:
repo-token-available: ${{ steps.repo-token.outputs.defined }}
steps:
- id: repo-token
env:
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
if: "${{ env.REPO_TOKEN != '' }}"
run: echo "defined=true" >> "$GITHUB_OUTPUT"
java11-build:
timeout-minutes: 20
needs: [ check-env ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup environment
uses: ./.github/actions/setup-environment
with:
java-version: 11
- name: Java 11 - unit & integration tests code coverage
run: >-
set -o pipefail
./mvnw -B -Pjava11,ci
-Dfailsafe.rerunFailingTestsCount=1
-Dsurefire.rerunFailingTestsCount=1
clean verify jacoco:report -Dscan -Dscan.tag.Java11
set +o pipefail
- name: Publish Test reports
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
with:
check_name: Java 11 Test Reports
report_paths: '**/target/*-reports/TEST-*.xml'
- name: Coveralls report
if: needs.check-env.outputs.repo-token-available == 'true'
env:
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
run: |
./mvnw -B -Pjava11 -DrepoToken=$REPO_TOKEN coveralls:report
java17-build:
timeout-minutes: 20
needs: [ check-env ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup environment
uses: ./.github/actions/setup-environment
with:
java-version: 17
- name: Java 17 - unit & integration tests code coverage
run: >-
set -o pipefail
./mvnw -B -Pjava17,ci
-Dfailsafe.rerunFailingTestsCount=1
-Dsurefire.rerunFailingTestsCount=1
clean verify jacoco:report -Dscan -Dscan.tag.Java17
set +o pipefail
- name: Publish Test reports
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
with:
check_name: Java 17 Test Reports
report_paths: '**/target/*-reports/TEST-*.xml'
- name: Coveralls report
if: needs.check-env.outputs.repo-token-available == 'true'
env:
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
run: |
./mvnw -B -Pjava17 -DrepoToken=$REPO_TOKEN coveralls:report
java17-parallelism-tests:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup environment
uses: ./.github/actions/setup-environment
with:
java-version: 17
- name: determine Fluentlenium version
uses: ./.github/actions/determine-fluentlenium-version
- name: Java 17 - unit & integration tests
run: >-
./mvnw -Dit.project.version=$FLUENTLENIUM_VERSION
-B -Pframework-integration-tests,java17
-pl '!fluentlenium-integration-tests,!fluentlenium-kotest,
!fluentlenium-kotest-assertions,!fluentlenium-cucumber,
!fluentlenium-spock,!fluentlenium-coverage-report,
!fluentlenium-spring-testng'
clean test -Dtest=*/it/* -Dsurefire.failIfNoSpecifiedTests=false
- name: Publish Test reports
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
with:
check_name: Java 17 Parallelism Test Reports
report_paths: '**/target/*-reports/TEST-*.xml'
java17-javadoc:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup environment
uses: ./.github/actions/setup-environment
with:
java-version: 17
- name: Install Fluentlenium
uses: ./.github/actions/fluentlenium-maven-install
- name: Java 17 - JavaDoc
run: ./mvnw -B -Pjava17 javadoc:aggregate
- name: Java 17 - Dokka
run: >-
./mvnw -B -pl fluentlenium-kotest,fluentlenium-kotest-assertions
-P sonatype-oss-release org.jetbrains.dokka:dokka-maven-plugin:dokka