-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (28 loc) · 894 Bytes
/
Copy pathci.yml
File metadata and controls
34 lines (28 loc) · 894 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
name: CI
on:
push:
branches: [ "main", "develop", "feature/**", "fix/**" ]
pull_request:
branches: [ "develop", "main" ]
jobs:
build-and-test:
name: Build & Test (Java 17)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Java 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven # met le dépôt Maven en cache → builds 2x plus rapides
- name: Build & run tests
run: ./mvnw test --no-transfer-progress
- name: Upload Surefire reports on failure
if: failure() # s'exécute UNIQUEMENT si les tests échouent
uses: actions/upload-artifact@v4
with:
name: surefire-reports
path: target/surefire-reports/
retention-days: 7