diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 2669c40ef..540e1fffc 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -11,7 +11,7 @@ on: jobs: build: - name: Build + name: Build and Test runs-on: ubuntu-latest steps: - name: Checkout repository @@ -21,7 +21,7 @@ jobs: fetch-tags: true - name: Setup JDK - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: java-version: '17' distribution: 'microsoft' @@ -34,3 +34,10 @@ jobs: - name: Test run: ./gradlew --info -s check + + # Always upload test results + - uses: actions/upload-artifact@v3 + if: success() || failure() + with: + name: test-results + path: "**/TEST-*.xml" diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml new file mode 100644 index 000000000..8804adedb --- /dev/null +++ b/.github/workflows/test-report.yml @@ -0,0 +1,20 @@ +name: 'Test Report' +on: + workflow_run: + workflows: ['pr'] + types: + - completed +permissions: + contents: read + actions: read + checks: write +jobs: + report: + runs-on: ubuntu-latest + steps: + - uses: dorny/test-reporter@v1 + with: + artifact: test-results + name: Tests + path: '**/*.xml' + reporter: java-junit