-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
19 additions
and
399 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
name: maven_test_publish | ||
name: mvn_test | ||
|
||
# run maven tests and publish results in one step | ||
# run from privileged branch | ||
|
||
permissions: | ||
checks: write | ||
|
@@ -78,7 +77,13 @@ on: | |
|
||
|
||
jobs: | ||
maven_test: | ||
mvn_test: | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- project: hello_world | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: git-checkout-ref-action | ||
|
@@ -109,51 +114,25 @@ jobs: | |
java-version: '11' | ||
|
||
######################################################################################## | ||
- name: "Test ${{ inputs.project }}" | ||
- name: "Test ${{ matrix.project }}" | ||
run: | | ||
mvn -T 1C --batch-mode test \ | ||
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ | ||
--projects=${{ inputs.project }} --fail-at-end | ||
--projects=${{ matrix.project }} --fail-at-end | ||
- name: Publish Unit Test Results | ||
- name: Publish Unit Test report for non forked repo | ||
if: ${{ failure() && (github.event.pull_request.head.repo.full_name == github.repository) }} # only report if a test has failed and we are a non forked repo | ||
uses: dorny/test-reporter@e9fa2f582c0ebbe2e263fd18fad744d52e0b0203 | ||
with: | ||
name: "maven_test_publish_${{ inputs.project }}" | ||
path: ${{ inputs.project }}/target/surefire-reports/*.xml | ||
name: "Unit Test report for ${{ matrix.project }}" | ||
path: ${{ matrix.project }}/target/surefire-reports/*.xml | ||
reporter: java-junit | ||
fail-on-error: true | ||
|
||
# - name: Publish Unit Test Results | ||
# uses: scacap/[email protected] | ||
# if: failure() # only report if a test has failed | ||
# with: | ||
# report_paths: ${{ inputs.project }}/target/surefire-reports/*.xml | ||
# create_check: true | ||
# fail_on_test_failures: false | ||
# file_name_in_stack_trace: true | ||
# skip_publishing: false | ||
# fail_if_no_tests: false | ||
|
||
# - name: Publish Unit Test Results non forked repo | ||
# uses: mikepenz/action-junit-report@v5 | ||
# if: ${{ failure() && (github.event.pull_request.head.repo.full_name == github.repository) }} # only report if a test has failed and we are a non forked repo | ||
# with: | ||
# check_name: Unit Test Report ${{ inputs.project }} | ||
# report_paths: ${{ inputs.project }}/target/surefire-reports/*.xml | ||
# annotate_only: false | ||
# | ||
- name: Publish Unit Test Results forked repo | ||
uses: mikepenz/action-junit-report@v5 | ||
- name: Publish Unit Test report for forked repo | ||
uses: mikepenz/action-junit-report@ec3a351c13e080dc4fa94c49ab7ad5bf778a9668 # v5 | ||
if: ${{ failure() && (github.event.pull_request.head.repo.full_name != github.repository) }} # only report if a test has failed and we are a forked repo | ||
with: | ||
report_paths: ${{ inputs.project }}/target/surefire-reports/*.xml | ||
annotate_only: true # forked repo cannot write to checks | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
report_paths: ${{ matrix.project }}/target/surefire-reports/*.xml | ||
annotate_only: true # forked repo cannot write to checks so just do annotations | ||
|
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.