-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (59 loc) · 1.62 KB
/
build.yml
File metadata and controls
70 lines (59 loc) · 1.62 KB
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
name: Build & Test
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Temurin JDK
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 25
cache: gradle
- name: Log system & Java info (drift detection)
run: |
echo "=== Environment Info ==="
uname -a
echo "=== Java Version ==="
java -version
echo "=== Gradle Version ==="
./gradlew --version
- name: Run tests
run: ./gradlew test --no-daemon
- name: Build application
run: ./gradlew build -x test --no-daemon
- name: Run static analysis
run: ./gradlew spotbugsMain pmdMain --no-daemon
- name: Upload test reports on failure
if: failure()
uses: actions/upload-artifact@v6
with:
name: test-results
path: build/test-results/
retention-days: 7
- name: Upload SpotBugs report on failure
if: failure()
uses: actions/upload-artifact@v6
with:
name: spotbugs-report
path: build/reports/spotbugs/
retention-days: 7
- name: Upload PMD report on failure
if: failure()
uses: actions/upload-artifact@v6
with:
name: pmd-report
path: build/reports/pmd/
retention-days: 7