-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (81 loc) · 2.46 KB
/
main.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
name: Java CI
on: [ push ]
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
cache: maven
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.9
- name: Build app with Maven
run: ./mvnw -B package -DskipTests
unit-tests:
runs-on: ubuntu-24.04
steps:
- name: Sops Binary Installer
uses: mdgreenwald/mozilla-sops-action@v1.6.0
with:
version: '3.9.0'
id: install
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
cache: maven
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.9
- name: Build and Test with Maven
run: ./mvnw -B test
browser-tests:
timeout-minutes: 60
runs-on: ubuntu-24.04
steps:
- name: Sops Binary Installer
uses: mdgreenwald/mozilla-sops-action@v1.6.0
with:
version: '3.9.0'
id: install
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.9
# https://playwright.dev/java/docs/ci-intro#setting-up-github-actions
- name: Build & Install
run: mvn -B install -D skipTests --no-transfer-progress -DskipShade=true
- name: Ensure browsers are installed
run: mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install --with-deps"
- name: run tests
run: mvn verify -DskipShade=true