Skip to content
Merged

3 #2

Changes from all commits
Commits
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
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Java CI with Maven

on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]
workflow_dispatch:

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: Move into project directory
working-directory: ./TourGuide
run: pwd

- name: Install local JAR dependencies
working-directory: ./TourGuide
run: |
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: tourguide-jar
path: TourGuide/target/*.jar