-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (48 loc) · 1.75 KB
/
maven.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
name: Build & Test Maven Project
on:
push:
schedule:
- cron: '0 15 * * *' # daily at 3pm
jobs:
build-and-test:
runs-on: ubuntu-20.04
name: Build Application
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup for JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
java-package: jdk
cache: maven
- name: Setup Node 16
uses: actions/setup-node@v3
with:
cache: npm
cache-dependency-path: src/frontend/package-lock.json
- name: Build & Test application
run: ./mvnw verify
- name: Ensure unit tests can be parallelized
run: ./mvnw test -Djunit.jupiter.execution.parallel.enabled=true -Djunit.jupiter.execution.parallel.mode.default=same_thread -Djunit.jupiter.execution.parallel.mode.classes.default=concurrent
- name: Flatten Selenide Screenshots and HTML Source Code on Failure
if: ${{ failure() }}
working-directory: target
env:
SOURCE_FOLDER: selenide-screenshots
DESTINATION_FOLDER: aggregated-outcome
run: |
mkdir "$DESTINATION_FOLDER"
if [ -d "$SOURCE_FOLDER" ]; then
find "$SOURCE_FOLDER" -type f -name '*.png' -exec mv -i {} "$DESTINATION_FOLDER" \;
find "$SOURCE_FOLDER" -type f -name '*.html' -exec mv -i {} "$DESTINATION_FOLDER" \;
else
echo "No Selenide failure artifacts found in folder $SOURCE_FOLDER"
fi
- name: Archive Selenide Outcome on Failure
uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: selenide-failure-captures
path: target/aggregated-outcome