-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.36 KB
/
build.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
name: Build
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]
merge_group:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Setup Services
run: doc/script/dependency-start.sh
- name: Build with Maven
run: ./mvnw install
- name: Check uncommitted changes to ensure format applied
run: |
if [[ -n $(git status --porcelain) ]]; then
git status
echo "There are uncommitted changes. Please run './mvnw spotless:apply' and commit the changes."
exit 1
else
echo "No uncommitted changes."
fi
- name: Test Legacy Service
run: sudo docker exec cheese_legacy pnpm test
- name: Upload jar
uses: actions/upload-artifact@v4
with:
name: jar
path: target/*.jar
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage
path: target/site/jacoco