build: include Minecraft target in plugin jar name #5
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: [ main ] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| checks: write # allow the test reporter to publish check annotations | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '25' | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Run tests | |
| run: ./gradlew test --stacktrace | |
| - name: Publish test report | |
| uses: mikepenz/action-junit-report@v5 | |
| if: ${{ !cancelled() }} # run even if tests failed, so failures are annotated | |
| with: | |
| report_paths: '**/build/test-results/test/TEST-*.xml' | |
| detailed_summary: true | |
| - name: Upload HTML test reports | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: test-reports | |
| path: '**/build/reports/tests/test/' | |
| if-no-files-found: ignore |