Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
94c4ba7
rm(gitlab ci): remove gitlab ci since this project is now hosted on g…
R-Gld Dec 21, 2025
9acd894
ci(ci.yml): migrate gitlab ci to GitHub Actions CI/CD pipeline
R-Gld Dec 21, 2025
614d974
ci(ci.yml): add dependency on check-envvars for build jobs
R-Gld Dec 21, 2025
7dadb30
ci(ci.yml): remove Maven setup step from CI pipeline
R-Gld Dec 21, 2025
1b0fd36
ci(settings.sh): create .m2 directory if it doesn't exist
R-Gld Dec 21, 2025
65792b8
ci(ci.yml): simplify CI configuration and remove connection to the un…
R-Gld Dec 21, 2025
c7606af
ci(ci.yml): update LexerParser module installation to include CLI
R-Gld Dec 21, 2025
aaca31a
ci(ci.yml): add packaging step to CI pipeline
R-Gld Dec 21, 2025
964a5ae
ci(ci.yml): add Git installation step to CI pipeline
R-Gld Dec 21, 2025
6fe9fe5
rm(RELEASE.md): since no release is going to be made.
R-Gld Dec 21, 2025
3e2262d
feat(qodana): add Qodana configuration files for code quality analysis
R-Gld Dec 21, 2025
50417a1
ci(ci.yml): add concurrency configuration to CI pipeline
R-Gld Dec 21, 2025
ec3e568
ci(ci.yml): update conditions for CI job execution
R-Gld Dec 21, 2025
c92c603
ci(ci.yml): add steps to download test artifacts
R-Gld Dec 21, 2025
1549a64
ci(ci.yml): streamline secret checks in CI jobs
R-Gld Dec 21, 2025
ef15242
ci(ci.yml): update Maven command to include CLI options
R-Gld Dec 21, 2025
30b6cf7
ci(ci.yml): update environment variable reference for SonarQube secrets
R-Gld Dec 21, 2025
cafe7cc
ci(ci.yml): update SONAR_HOST_URL reference to use environment variable
R-Gld Dec 21, 2025
d665591
ci(ci.yml): remove secret checks for SonarQube in CI jobs
R-Gld Dec 21, 2025
a69374c
ci(ci.yml): refactor CI workflow for packaging and quality analysis
R-Gld Dec 21, 2025
bb7ffe8
ci(ci.yml): update SonarQube cache key to include branch name
R-Gld Dec 21, 2025
c4e81de
ci(ci.yml): simplify SonarQube cache key configuration
R-Gld Dec 21, 2025
db3883e
ci(ci.yml): simplify SonarQube cache key configuration
R-Gld Dec 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
216 changes: 216 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
name: CI/CD Pipeline

on:
push:
branches: [main, dev]
tags: ['*']
pull_request:
branches: [main, dev]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
MAVEN_CLI_OPTS_SINGLE_THREAD: "-B -V -ntp --fail-at-end"
MAVEN_CLI_OPTS: "-B -V -ntp --fail-at-end -T 1C"

jobs:
build:
name: Build
runs-on: ubuntu-latest
container:
image: maven:3.9.9-eclipse-temurin-21-alpine
if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Cache Maven packages
uses: actions/cache@v5
with:
path: .m2/repository
key: m2-${{ github.ref_name }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
m2-${{ github.ref_name }}-
m2-

- name: Build with Maven
run: mvn ${MAVEN_CLI_OPTS} -pl '!Rapport' clean compile

build-rapport:
name: Build Rapport PDF
runs-on: ubuntu-latest
container:
image: ghcr.io/r-gld/maven-with-texlive:latest
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event_name == 'push' && github.ref == 'refs/heads/dev') ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'rapport'))
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Cache Maven packages
uses: actions/cache@v5
with:
path: .m2/repository
key: m2-${{ github.ref_name }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
m2-${{ github.ref_name }}-
m2-

- name: Build rapport
run: |
mvn ${MAVEN_CLI_OPTS} -pl 'Rapport' clean compile
cp Rapport/target/latex/rapport_principal.pdf rapport_principal.pdf

- name: Upload rapport PDF
uses: actions/upload-artifact@v6
with:
name: rapport-${{ github.sha }}
path: rapport_principal.pdf
retention-days: 7

test:
name: Unit Tests
runs-on: ubuntu-latest
container:
image: maven:3.9.9-eclipse-temurin-21-alpine
needs: build
if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Cache Maven packages
uses: actions/cache@v5
with:
path: .m2/repository
key: m2-${{ github.ref_name }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
m2-${{ github.ref_name }}-
m2-

- name: Run tests with Jacoco
run: mvn ${MAVEN_CLI_OPTS} -pl '!GUI,!CoverageReport,!Rapport' jacoco:prepare-agent test jacoco:report

- name: Upload test results
if: always()
uses: actions/upload-artifact@v6
with:
name: test-results
path: |
**/target/surefire-reports/TEST-*.xml
**/target/site/jacoco/jacoco.xml
**/target/classes/
retention-days: 7

testIHM:
name: GUI Tests
runs-on: ubuntu-latest
container:
image: maven:3.9.9-eclipse-temurin-21-alpine
needs: build
if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Cache Maven packages
uses: actions/cache@v5
with:
path: .m2/repository
key: m2-${{ github.ref_name }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
m2-${{ github.ref_name }}-
m2-

- name: Install Xvfb and dependencies
run: apk add xvfb libx11-dev xvfb-run gtk+3.0

- name: Start Xvfb
run: |
export DISPLAY=:99
Xvfb $DISPLAY -screen 0 1400x900x24 +extension RANDR &

- name: Install LexerParser module
run: mvn ${MAVEN_CLI_OPTS} -pl 'LexerParser,CLI' -am install -DskipTests

- name: Run GUI tests
run: xvfb-run -a mvn ${MAVEN_CLI_OPTS} -pl 'GUI' jacoco:prepare-agent test jacoco:report

- name: Upload GUI test results
if: always()
uses: actions/upload-artifact@v6
with:
name: testIHM-results
path: |
**/target/surefire-reports/TEST-*.xml
**/target/site/jacoco/jacoco.xml
**/target/classes/
retention-days: 7

package-and-quality:
name: Package & Quality Analysis
runs-on: ubuntu-latest
container:
image: maven:3.9.9-eclipse-temurin-21-alpine
needs: [build, test, testIHM]
if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
steps:
- name: Install Git
run: apk add --no-cache git

- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Cache Maven packages
uses: actions/cache@v5
with:
path: .m2/repository
key: m2-${{ github.ref_name }}
restore-keys: m2-

- name: Download test artifacts
uses: actions/download-artifact@v7
with:
name: test-results
path: .

- name: Download GUI test artifacts
uses: actions/download-artifact@v7
with:
name: testIHM-results
path: .

- name: Package JARs
run: mvn ${MAVEN_CLI_OPTS} -pl '!Rapport' -DskipTests package

- name: Upload JAR artifacts
uses: actions/upload-artifact@v6
with:
name: jars
path: "**/target/*.jar"
retention-days: 7

- name: Cache SonarQube packages
uses: actions/cache@v5
with:
path: .sonar/cache
key: sonar-${{ github.ref_name }}
restore-keys: sonar-

- name: Run SonarQube analysis
env:
SONAR_USER_HOME: .sonar
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
run: |
mvn ${MAVEN_CLI_OPTS_SINGLE_THREAD} -pl '!Rapport' -DskipTests sonar:sonar \
-Dsonar.projectKey=avm-2025-groupe-7 \
-Dsonar.projectName='avm-2025-groupe-7'
39 changes: 39 additions & 0 deletions .github/workflows/qodana_code_quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#-------------------------------------------------------------------------------#
# Discover all capabilities of Qodana in our documentation #
# https://www.jetbrains.com/help/qodana/about-qodana.html #
#-------------------------------------------------------------------------------#

name: Qodana
on:
workflow_dispatch:
pull_request:
push:
branches: [main, dev]
tags: ['*']

jobs:
qodana:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
checks: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2025.3
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
with:
# When pr-mode is set to true, Qodana analyzes only the files that have been changed
pr-mode: false
use-caches: true
post-pr-comment: true
use-annotations: true
# Upload Qodana results (SARIF, other artifacts, logs) as an artifact to the job
upload-result: false
# quick-fixes available in Ultimate and Ultimate Plus plans
push-fixes: 'none'
Loading
Loading