-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from Group-5/feat/github-actions
merge feat/github-actions
- Loading branch information
Showing
1 changed file
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| name: CI/CD Workflow | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: # Allows manual triggering of the workflow | ||
|
|
||
|
|
||
| jobs: | ||
| build: | ||
| name: Build | ||
| runs-on: self-hosted | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up JDK | ||
| uses: actions/setup-java@v3 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '25' | ||
| - name: Build with Maven | ||
| run: mvn compile | ||
|
|
||
| test: | ||
| name: Test | ||
| runs-on: self-hosted | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up JDK | ||
| uses: actions/setup-java@v3 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '25' | ||
| - name: Run Tests | ||
| run: mvn clean test | ||
| - name: Upload Test Results | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: surefire-reports | ||
| path: target/surefire-reports/ | ||
| - name: Upload Coverage Report | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: jacoco-report | ||
| path: target/jacoco/coverage-reports/jacoco.xml | ||
|
|
||
| package: | ||
| name: Package | ||
| runs-on: self-hosted | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up JDK | ||
| uses: actions/setup-java@v3 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '25' | ||
| - name: Build Package | ||
| run: mvn clean package | ||
| - name: Upload Package | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: packaged-app | ||
| path: target/Help-Me-Help-1.0-SNAPSHOT-jar-with-dependencies.jar | ||
|
|
||
| deployPages: | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: self-hosted | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up JDK | ||
| uses: actions/setup-java@v3 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '25' |