chore(deps): bump actions/setup-java from 4 to 5 #1131
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: Examples | |
| on: [ push ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| checks: write | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Remove placeholder examples directory | |
| run: rm -rf examples | |
| - name: Checkout examples | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: 'imposter-project/examples' | |
| path: 'examples' | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 11 | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Set up build environment | |
| run: | | |
| # Disable gradle daemon | |
| mkdir -p ~/.gradle | |
| echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties | |
| - name: Install Maven dependencies locally | |
| id: publish-maven-local | |
| run: | | |
| ./gradlew publishToMavenLocal --stacktrace -xtest | |
| echo "PUBLISHED_VERSION=$( cat gradle.properties | grep projectVersion= | cut -c16- )" >> $GITHUB_OUTPUT | |
| - name: Test JUnit example project | |
| working-directory: ./examples/junit-sample | |
| run: ./mvnw test -Dimposter.version=${{ steps.publish-maven-local.outputs.PUBLISHED_VERSION }} | |
| - name: Publish Unit Test Results | |
| if: always() | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| with: | |
| files: "**/surefire-reports/**/*.xml" | |
| comment_mode: off |