Annuler Réservation #29
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
name: Java CI | |
on: | |
push: | |
branches: | |
- main # Replace with your default branch name | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: 17 | |
distribution: 'adopt' # Specify the distribution (e.g., adopt, adopt-openj9, openjdk) | |
architecture: x64 | |
check-latest: false | |
server-id: github | |
server-username: GITHUB_ACTOR | |
server-password: ${{ secrets.GITHUB_TOKEN }} | |
overwrite-settings: true | |
job-status: success | |
- name: Build with Maven | |
run: mvn clean install # Modify this command based on your project structure | |
- name: Run tests | |
run: mvn clean test -B | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: java-application | |
path: target/ # Modify this path to match your project's output |