Skip to content

Commit 281e073

Browse files
Merge remote-tracking branch 'origin/dev' into beta
2 parents 773d264 + 6e01895 commit 281e073

231 files changed

Lines changed: 37020 additions & 993 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-and-test.yml

Lines changed: 224 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,74 @@ on:
44
pull_request:
55
branches:
66
- dev
7-
- beta
87
- "epic/**"
98
types: [opened, synchronize, reopened, ready_for_review]
109

1110
jobs:
12-
build:
13-
name: "Build"
14-
timeout-minutes: 10
11+
check:
12+
name: "Check"
1513

1614
if: github.event.pull_request.draft == false
1715

16+
runs-on: ubuntu-latest
17+
outputs:
18+
testing_needed: ${{ steps.check.outputs.testing_needed }}
19+
20+
steps:
21+
- name: "Checkout Branch"
22+
uses: actions/checkout@v4
23+
24+
### Checks if there are any file changes that are not in the .github/ or doc/ directories. Only then will the build and test pipeline run.
25+
- name: "Check for changes outside CI and docs"
26+
id: check
27+
env:
28+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
run: |
30+
changed_files=$(gh pr diff --name-only ${{ github.event.pull_request.number }})
31+
32+
changesOutsideDocsCI=false
33+
for file in $changed_files; do
34+
if [[ $file != .github/* && $file != doc/* ]]; then
35+
echo "file: $file is not part of CI or docs"
36+
echo "Start testing pipeline."
37+
changesOutsideDocsCI=true
38+
break
39+
else
40+
echo "file: $file is part of CI or docs"
41+
fi
42+
done
43+
if [[ $changesOutsideDocsCI == true ]]; then
44+
echo "testing_needed=true" >> "$GITHUB_OUTPUT"
45+
echo "Changes outside CI and docs detected. Start testing pipeline."
46+
else
47+
echo "testing_needed=false" >> "$GITHUB_OUTPUT"
48+
echo "No need for the build and test pipeline to run. Exiting."
49+
fi
50+
51+
52+
build:
53+
name: "Build"
54+
timeout-minutes: 10
55+
needs: check
56+
if: |
57+
(github.event.pull_request.draft == false)
58+
&& (needs.check.outputs.testing_needed == 'true')
59+
1860
runs-on: ubuntu-latest
1961

2062
steps:
2163
- name: "Checkout Branch"
22-
uses: actions/checkout@v3
64+
uses: actions/checkout@v4
2365

2466
- name: "Setup Java"
25-
uses: actions/setup-java@v3
67+
uses: actions/setup-java@v4
2668
with:
2769
distribution: 'temurin'
28-
java-version: 17
70+
java-version: 21
2971
cache: 'gradle'
3072

3173
- name: Setup Gradle cache
32-
uses: actions/cache@v3
74+
uses: actions/cache@v4
3375
with:
3476
path: ~/.gradle
3577
key: ${{ runner.os }}-gradle-${{ hashFiles('versions.properties') }}-${{ github.sha }}
@@ -41,47 +83,204 @@ jobs:
4183
run: ./gradlew --build-cache build -x test
4284

4385
- name: Upload build reports
44-
uses: actions/upload-artifact@v3
86+
uses: actions/upload-artifact@v4
4587
if: ${{ failure() || contains(github.event.pull_request.labels.*.name, 'force reports') }}
4688
with:
4789
name: Build Reports
4890
path: "**/build/reports"
4991

50-
test:
51-
name: "Test"
52-
timeout-minutes: 120
5392

54-
if: github.event.pull_request.draft == false
93+
test_registry_unit:
94+
name: "Test Registry Unit"
5595
needs: build
96+
runs-on: ubuntu-latest
97+
steps:
98+
- name: "Checkout Branch"
99+
uses: actions/checkout@v4
100+
101+
- name: "Setup Java"
102+
uses: actions/setup-java@v4
103+
with:
104+
distribution: 'temurin'
105+
java-version: 21
106+
cache: 'gradle'
107+
108+
- name: Setup Gradle cache
109+
uses: actions/cache@v4
110+
with:
111+
path: ~/.gradle
112+
key: ${{ runner.os }}-gradle-${{ hashFiles('versions.properties') }}-${{ github.sha }}
113+
114+
- name: "Prepare libs for tests"
115+
run: ./prepare.sh
116+
117+
- name: "Run Tests"
118+
run: ./gradlew --build-cache --continue --rerun-tasks :bco.registry.unit.test:check
56119

120+
121+
test_registry_message:
122+
name: "Test Registry Message"
123+
needs: build
57124
runs-on: ubuntu-latest
125+
steps:
126+
- name: "Checkout Branch"
127+
uses: actions/checkout@v4
128+
129+
- name: "Setup Java"
130+
uses: actions/setup-java@v4
131+
with:
132+
distribution: 'temurin'
133+
java-version: 21
134+
cache: 'gradle'
135+
136+
- name: Setup Gradle cache
137+
uses: actions/cache@v4
138+
with:
139+
path: ~/.gradle
140+
key: ${{ runner.os }}-gradle-${{ hashFiles('versions.properties') }}-${{ github.sha }}
141+
142+
- name: "Prepare libs for tests"
143+
run: ./prepare.sh
144+
145+
- name: "Run Tests"
146+
run: ./gradlew --build-cache --continue --rerun-tasks :bco.registry.message.test:check
147+
58148

149+
test_registry_class:
150+
name: "Test Registry Class"
151+
needs: build
152+
runs-on: ubuntu-latest
59153
steps:
60154
- name: "Checkout Branch"
61-
uses: actions/checkout@v3
155+
uses: actions/checkout@v4
62156

63157
- name: "Setup Java"
64-
uses: actions/setup-java@v3
158+
uses: actions/setup-java@v4
65159
with:
66160
distribution: 'temurin'
67-
java-version: 17
161+
java-version: 21
68162
cache: 'gradle'
69163

70164
- name: Setup Gradle cache
71-
uses: actions/cache@v3
165+
uses: actions/cache@v4
72166
with:
73167
path: ~/.gradle
74168
key: ${{ runner.os }}-gradle-${{ hashFiles('versions.properties') }}-${{ github.sha }}
75169

76-
- name: "prepare libs for tests"
170+
- name: "Prepare libs for tests"
77171
run: ./prepare.sh
78172

79-
- name: "test backend"
80-
run: ./gradlew --build-cache check
173+
- name: "Run Tests"
174+
run: ./gradlew --build-cache --continue --rerun-tasks :bco.registry.class.test:check
81175

82-
- name: Upload test reports
83-
uses: actions/upload-artifact@v3
84-
if: ${{ failure() || contains(github.event.pull_request.labels.*.name, 'force reports') }}
176+
177+
test_authentication:
178+
name: "Test Authentication"
179+
needs: build
180+
runs-on: ubuntu-latest
181+
steps:
182+
- name: "Checkout Branch"
183+
uses: actions/checkout@v4
184+
185+
- name: "Setup Java"
186+
uses: actions/setup-java@v4
85187
with:
86-
name: Test Reports
87-
path: "**/build/reports"
188+
distribution: 'temurin'
189+
java-version: 21
190+
cache: 'gradle'
191+
192+
- name: Setup Gradle cache
193+
uses: actions/cache@v4
194+
with:
195+
path: ~/.gradle
196+
key: ${{ runner.os }}-gradle-${{ hashFiles('versions.properties') }}-${{ github.sha }}
197+
198+
- name: "Prepare libs for tests"
199+
run: ./prepare.sh
200+
201+
- name: "Run Tests"
202+
run: ./gradlew --build-cache --continue --rerun-tasks :bco.authentication.test:check
203+
204+
205+
test_dal:
206+
name: "Test DAL"
207+
needs: build
208+
runs-on: ubuntu-latest
209+
steps:
210+
- name: "Checkout Branch"
211+
uses: actions/checkout@v4
212+
213+
- name: "Setup Java"
214+
uses: actions/setup-java@v4
215+
with:
216+
distribution: 'temurin'
217+
java-version: 21
218+
cache: 'gradle'
219+
220+
- name: Setup Gradle cache
221+
uses: actions/cache@v4
222+
with:
223+
path: ~/.gradle
224+
key: ${{ runner.os }}-gradle-${{ hashFiles('versions.properties') }}-${{ github.sha }}
225+
226+
- name: "Prepare libs for tests"
227+
run: ./prepare.sh
228+
229+
- name: "Run Tests"
230+
run: ./gradlew --build-cache --continue --rerun-tasks :bco.dal.test:check
231+
232+
233+
test_app:
234+
name: "Test App"
235+
needs: build
236+
runs-on: ubuntu-latest
237+
steps:
238+
- name: "Checkout Branch"
239+
uses: actions/checkout@v4
240+
241+
- name: "Setup Java"
242+
uses: actions/setup-java@v4
243+
with:
244+
distribution: 'temurin'
245+
java-version: 21
246+
cache: 'gradle'
247+
248+
- name: Setup Gradle cache
249+
uses: actions/cache@v4
250+
with:
251+
path: ~/.gradle
252+
key: ${{ runner.os }}-gradle-${{ hashFiles('versions.properties') }}-${{ github.sha }}
253+
254+
- name: "Prepare libs for tests"
255+
run: ./prepare.sh
256+
257+
- name: "Run Tests"
258+
run: ./gradlew --build-cache --continue --rerun-tasks :bco.app.test:check
259+
260+
261+
test_app_preset:
262+
name: "Test App Preset"
263+
needs: build
264+
runs-on: ubuntu-latest
265+
steps:
266+
- name: "Checkout Branch"
267+
uses: actions/checkout@v4
268+
269+
- name: "Setup Java"
270+
uses: actions/setup-java@v4
271+
with:
272+
distribution: 'temurin'
273+
java-version: 21
274+
cache: 'gradle'
275+
276+
- name: Setup Gradle cache
277+
uses: actions/cache@v4
278+
with:
279+
path: ~/.gradle
280+
key: ${{ runner.os }}-gradle-${{ hashFiles('versions.properties') }}-${{ github.sha }}
281+
282+
- name: "Prepare libs for tests"
283+
run: ./prepare.sh
284+
285+
- name: "Run Tests"
286+
run: ./gradlew --build-cache --continue --rerun-tasks :bco.app.preset:check

0 commit comments

Comments
 (0)