add github actions to display test and dependabot #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: Tests | |
| on: | |
| push: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Test on JDK ${{ matrix.java }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java: [ '21', '23' ] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Run tests with Maven | |
| run: ./mvnw clean test --batch-mode --no-transfer-progress | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-jdk-${{ matrix.java }} | |
| path: target/surefire-reports/ | |
| - name: Publish test report | |
| if: always() | |
| uses: dorny/test-reporter@v2 | |
| with: | |
| name: Test Results (JDK ${{ matrix.java }}) | |
| path: 'target/surefire-reports/TEST-*.xml' | |
| reporter: java-junit |