Merge pull request #16 from jduchateau/github-actions #1
This file contains hidden or 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 with Maven | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| name: Run Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Build and test with Maven | |
| run: mvn test | |
| - name: Publish Test Report | |
| uses: mikepenz/action-junit-report@v6.0.0 | |
| if: success() || failure() # always run even if the previous step fails | |
| with: | |
| report_paths: '**/target/surefire-reports/TEST-*.xml' |