From f8412906f42c68b4f79a4bdd6b550887805463cb Mon Sep 17 00:00:00 2001 From: Gilles Desbonnets Date: Fri, 7 Nov 2025 14:12:01 +0100 Subject: [PATCH 1/3] [ADD] .github/workflows/ci.yml (init config pipeline) --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..0a4a7ee9cb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: Java CI with Maven + +on: + push: + branches: [ "**" ] + pull_request: + branches: [ "**" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + + - name: Install local JAR dependencies + run: | + mkdir -p ~/.m2/repository + mvn install:install-file -Dfile=libs/gpsUtil.jar -DgroupId=gpsUtil -DartifactId=gpsUtil -Dversion=1.0.0 -Dpackaging=jar + mvn install:install-file -Dfile=libs/RewardCentral.jar -DgroupId=rewardCentral -DartifactId=rewardCentral -Dversion=1.0.0 -Dpackaging=jar + mvn install:install-file -Dfile=libs/TripPricer.jar -DgroupId=tripPricer -DartifactId=tripPricer -Dversion=1.0.0 -Dpackaging=jar + + - name: Build and test with Maven + run: mvn clean verify --no-transfer-progress + + - name: Package application + run: mvn package -DskipTests --no-transfer-progress + + - name: Upload built artifact + uses: actions/upload-artifact@v4 + with: + name: springboot-app + path: target/*.jar From fb4d7d3c5e4f502ff2e9b002f4c148c54b5b5792 Mon Sep 17 00:00:00 2001 From: Gilles Desbonnets Date: Fri, 7 Nov 2025 14:14:48 +0100 Subject: [PATCH 2/3] [FIX] move ci.yml --- {.github => TourGuide/.github}/workflows/ci.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {.github => TourGuide/.github}/workflows/ci.yml (100%) diff --git a/.github/workflows/ci.yml b/TourGuide/.github/workflows/ci.yml similarity index 100% rename from .github/workflows/ci.yml rename to TourGuide/.github/workflows/ci.yml From 5e96fead0a347e2333ace1c297a86fde9e722328 Mon Sep 17 00:00:00 2001 From: Gilles Desbonnets Date: Fri, 7 Nov 2025 14:23:17 +0100 Subject: [PATCH 3/3] [FIX] move ci.yml + ajout du workdir --- {TourGuide/.github => .github}/workflows/ci.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) rename {TourGuide/.github => .github}/workflows/ci.yml (78%) diff --git a/TourGuide/.github/workflows/ci.yml b/.github/workflows/ci.yml similarity index 78% rename from TourGuide/.github/workflows/ci.yml rename to .github/workflows/ci.yml index 0a4a7ee9cb..7b2774a8cc 100644 --- a/TourGuide/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: branches: [ "**" ] pull_request: branches: [ "**" ] + workflow_dispatch: jobs: build: @@ -21,21 +22,27 @@ jobs: distribution: 'temurin' cache: maven + - name: Move into project directory + working-directory: ./TourGuide + run: pwd + - name: Install local JAR dependencies + working-directory: ./TourGuide run: | - mkdir -p ~/.m2/repository mvn install:install-file -Dfile=libs/gpsUtil.jar -DgroupId=gpsUtil -DartifactId=gpsUtil -Dversion=1.0.0 -Dpackaging=jar mvn install:install-file -Dfile=libs/RewardCentral.jar -DgroupId=rewardCentral -DartifactId=rewardCentral -Dversion=1.0.0 -Dpackaging=jar mvn install:install-file -Dfile=libs/TripPricer.jar -DgroupId=tripPricer -DartifactId=tripPricer -Dversion=1.0.0 -Dpackaging=jar - name: Build and test with Maven + working-directory: ./TourGuide run: mvn clean verify --no-transfer-progress - name: Package application + working-directory: ./TourGuide run: mvn package -DskipTests --no-transfer-progress - name: Upload built artifact uses: actions/upload-artifact@v4 with: - name: springboot-app - path: target/*.jar + name: tourguide-jar + path: TourGuide/target/*.jar