attempt 2 #51
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: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: "21" | |
| distribution: "temurin" | |
| cache: maven | |
| - name: Run tests | |
| run: mvn -B test --file pom.xml | |
| - name: Build JAR only | |
| run: mvn -B compile jar:jar --file pom.xml | |
| - name: Upload compiled jar | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jaiva-cli | |
| path: target/jaiva-*.jar | |
| if-no-files-found: error | |
| - name: Upload surefire reports | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: surefire-reports | |
| path: target/surefire-reports/** | |
| retention-days: 7 |