-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (47 loc) · 1.67 KB
/
ci.yml
File metadata and controls
60 lines (47 loc) · 1.67 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
name: Java CI with Maven
on:
push:
branches: [ "**" ] # Toutes les branches
pull_request:
branches: [ "**" ] # Toutes les PR
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Cache SonarQube packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
# Build tous les modules
- name: Build all modules
run: mvn -B clean install -DskipTests
# Exécuter les tests du module core
- name: Run tests for core module
run: mvn -B test -pl itexpert-content-core
# Exécuter les tests du module API
- name: Run tests for api module
run: mvn -B test -pl itexpert-content-api
# Analyse SonarQube pour chaque module
- name: 🔍 SonarQube Scan - Lib
run: mvn -f itexpert-content-lib/pom.xml sonar:sonar -Dsonar.token=${{ secrets.SONAR_TOKEN }}
- name: 🔍 SonarQube Scan - Core
run: mvn -f itexpert-content-core/pom.xml sonar:sonar -Dsonar.token=${{ secrets.SONAR_TOKEN }}
- name: 🔍 SonarQube Scan - API
run: mvn -f itexpert-content-api/pom.xml sonar:sonar -Dsonar.token=${{ secrets.SONAR_TOKEN }}
- name: 🔍 SonarQube Scan - Studio
run: mvn -f itexpert-content-ui/pom.xml sonar:sonar -Dsonar.token=${{ secrets.SONAR_TOKEN }}