-
Notifications
You must be signed in to change notification settings - Fork 32
46 lines (41 loc) · 1.34 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
name: Build & Test Maven Project
on:
push:
schedule:
- cron: '0 15 * * *' # daily at 3pm
jobs:
build-and-test:
runs-on: ubuntu-latest
name: Build Application
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup for JDK 21
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 21
java-package: jdk
cache: maven
- name: Build & Test application
run: ./mvnw verify
- 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