-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish test results using EnricoMi/publish-unit-test-result-action
- Loading branch information
Showing
3 changed files
with
61 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,27 @@ on: | |
branches: | ||
- main | ||
jobs: | ||
publish: | ||
event-file: | ||
# https://github.com/marketplace/actions/publish-test-results#support-fork-repositories-and-dependabot-branches | ||
name: "Event File" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Upload | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: event-file | ||
path: ${{ github.event_path }} | ||
publish: | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
# - windows-latest | ||
# - macos-latest | ||
java: | ||
- 8 | ||
# - 17 | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -16,18 +35,21 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
distribution: 'zulu' | ||
java-version: 8 | ||
cache: 'gradle' | ||
java-version: ${{ matrix.java }} | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
- name: build publish | ||
run: ./gradlew clean build publish --info --stacktrace | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SIGNING_KEY }} | ||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SIGNING_PASSWORD }} | ||
- name: Publish Test Report | ||
if: ${{ always() }} | ||
uses: scacap/action-surefire-report@v1 | ||
- name: Upload Test Results | ||
# see publish-test-results.yml for workflow that publishes test results without security issues for forks | ||
# https://github.com/marketplace/actions/publish-test-results#support-fork-repositories-and-dependabot-branches | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
report_paths: '**/build/test-results/test/TEST-*.xml' | ||
name: Test Results (Java ${{ matrix.java }} on ${{ matrix.os }}) | ||
path: '**/build/test-results/test/TEST-*.xml' | ||
... |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ on: | |
workflows: | ||
- CI | ||
- Publish | ||
- Release | ||
types: | ||
- completed | ||
permissions: {} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,27 @@ on: | |
# - published | ||
|
||
jobs: | ||
release: | ||
event-file: | ||
# https://github.com/marketplace/actions/publish-test-results#support-fork-repositories-and-dependabot-branches | ||
name: "Event File" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Upload | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: event-file | ||
path: ${{ github.event_path }} | ||
release: | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
# - windows-latest | ||
# - macos-latest | ||
java: | ||
- 8 | ||
# - 17 | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -18,8 +37,9 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
distribution: 'zulu' | ||
java-version: 8 | ||
cache: 'gradle' | ||
java-version: ${{ matrix.java }} | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
- name: Set artifact version | ||
run: | | ||
echo "RELEASE_VERSION=$(echo '${{ github.event.release.tag_name }}' | sed -e s/^v//)" >> $GITHUB_ENV | ||
|
@@ -32,10 +52,12 @@ jobs: | |
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
- name: Publish Test Report | ||
if: ${{ always() }} | ||
uses: scacap/action-surefire-report@v1 | ||
- name: Upload Test Results | ||
# see publish-test-results.yml for workflow that publishes test results without security issues for forks | ||
# https://github.com/marketplace/actions/publish-test-results#support-fork-repositories-and-dependabot-branches | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
report_paths: '**/build/test-results/test/TEST-*.xml' | ||
name: Test Results (Java ${{ matrix.java }} on ${{ matrix.os }}) | ||
path: '**/build/test-results/test/TEST-*.xml' | ||
... |