ci: don't duplicate unit test execution on local maven publish. #900
This file contains 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 | |
permissions: | |
checks: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Install Maven dependencies locally | |
run: ./gradlew publishToMavenLocal --stacktrace -xtest | |
- name: Test JUnit example project | |
working-directory: ./examples/junit-sample | |
run: | | |
PUBLISHED_VERSION=$( cat gradle.properties | grep projectVersion= | cut -c16- ) | |
./mvnw test -Dimposter.version=${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 |