corevalidation-report.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: Publish CoreValidation Test Results
  2. on:
  3. workflow_run:
  4. workflows: ["CoreValidation"]
  5. branches-ignore: ["develop"]
  6. types:
  7. - completed
  8. jobs:
  9. publish-test-results:
  10. name: Publish CoreValidation Test Results
  11. runs-on: ubuntu-latest
  12. permissions:
  13. contents: read
  14. issues: read
  15. checks: write
  16. pull-requests: write
  17. if: github.event.workflow_run.conclusion != 'skipped'
  18. steps:
  19. - name: Download test results
  20. env:
  21. GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
  22. run: |
  23. mkdir -p artifacts && cd artifacts
  24. artifacts_url=${{ github.event.workflow_run.artifacts_url }}
  25. gh api "$artifacts_url" -q '.artifacts[] | select(.name=="tests" or .name=="EventFile") | [.name, .archive_download_url] | @tsv' | \
  26. while read artifact; do
  27. IFS=$'\t' read name url <<< "$artifact"
  28. gh api $url > "$name.zip"
  29. unzip -d "$name" "$name.zip"
  30. done
  31. - name: Publish Test Results
  32. uses: EnricoMi/publish-unit-test-result-action@v2
  33. with:
  34. commit: ${{ github.event.workflow_run.head_sha }}
  35. event_file: artifacts/EventFile/event.json
  36. report_individual_runs: true
  37. event_name: ${{ github.event.workflow_run.event }}
  38. junit_files: "artifacts/**/*.junit"