-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 981 Bytes
/
Copy pathcontinuous-integration.yml
File metadata and controls
50 lines (41 loc) · 981 Bytes
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
name: Continuous Integration
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
checks: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B clean install
- name: Run tests
run: mvn -B test
- name: Generate test report
if: always()
uses: dorny/test-reporter@v1
with:
name: Maven Tests
path: '**/target/surefire-reports/*.xml'
reporter: java-junit
fail-on-error: true
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: '**/target/surefire-reports/'
retention-days: 30