From 5bf84034deafef8253483aec21c8cd09a71b7372 Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Thu, 15 Apr 2021 22:03:06 +0000 Subject: [PATCH] Remove junit test result processor This has some problems, namely that it gets confused as to what workflow run to add results to. Related issue: https://github.com/EnricoMi/publish-unit-test-result-action/issues/12 This seems to be a shortcoming of the github API: https://github.community/t/specify-check-suite-when-creating-a-checkrun/118380/7 Signed-off-by: Brian Goff --- .github/workflows/publish_test_results.yml | 61 ---------------------- 1 file changed, 61 deletions(-) delete mode 100644 .github/workflows/publish_test_results.yml diff --git a/.github/workflows/publish_test_results.yml b/.github/workflows/publish_test_results.yml deleted file mode 100644 index 31ba7769f..000000000 --- a/.github/workflows/publish_test_results.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Publish Test Results - -on: - workflow_run: - workflows: ["CI"] - types: - - completed - -jobs: - test-results: - runs-on: ubuntu-latest - name: Publish Test Results - if: > - github.event.workflow_run.conclusion != 'skipped' && ( - github.event.workflow_run.head_repository.full_name != github.repository - ) - steps: - - name: Download Artifacts - uses: actions/github-script@v3.1.0 - with: - script: | - var fs = require('fs'); - var path = require('path'); - var artifacts_path = path.join('${{github.workspace}}', 'artifacts') - fs.mkdirSync(artifacts_path, { recursive: true }) - - var artifacts = await github.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{ github.event.workflow_run.id }}, - }); - - for (const artifact of artifacts.data.artifacts) { - var download = await github.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: artifact.id, - archive_format: 'zip', - }); - var artifact_path = path.join(artifacts_path, `${artifact.name}.zip`) - fs.writeFileSync(artifact_path, Buffer.from(download.data)); - console.log(`Downloaded ${artifact_path}`); - } - - name: Extract Artifacts - run: | - for file in artifacts/*.zip - do - if [ -f "$file" ] - then - dir="${file/%.zip/}" - mkdir -p "$dir" - unzip -d "$dir" "$file" - fi - done - - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v1 - with: - files: artifacts/*/**/*.xml - check_name: Test Results - comment_on_pr: true - commit: ${{ github.event.workflow_run.head_sha }} \ No newline at end of file