-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(test_framework): Add workflow scripts to show test results in PRs
The trigger for running tests is disabled until we want to enable them. In order to run, these scripts (like other workflow scripts) must be in the main branch (master).
- Loading branch information
1 parent
6d2f749
commit 6f9b141
Showing
2 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Process Test Results | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Run Tests"] | ||
types: | ||
- completed | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
process-test-results: | ||
name: Process Test Results | ||
runs-on: ubuntu-latest | ||
if: github.event.workflow_run.conclusion != 'skipped' | ||
|
||
permissions: | ||
checks: write | ||
|
||
# needed unless run with comment_mode: off | ||
pull-requests: write | ||
|
||
# required by download step to access artifacts API | ||
actions: read | ||
|
||
steps: | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts | ||
github-token: ${{ github.token }} | ||
run-id: ${{ github.event.workflow_run.id }} | ||
|
||
- name: Publish Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
with: | ||
time_unit: milliseconds | ||
commit: ${{ github.event.workflow_run.head_sha }} | ||
event_file: artifacts/Event File/event.json | ||
event_name: ${{ github.event.workflow_run.event }} | ||
files: "artifacts/Test Results/*.json" |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Run Tests | ||
|
||
on: | ||
# push: | ||
# branches-ignore: | ||
# - master | ||
|
||
jobs: | ||
upload-event_file: | ||
name: Upload Event File | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Upload Event File | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Event File | ||
path: ${{ github.event_path }} | ||
|
||
run-tests: | ||
name: Run Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run Tests | ||
run: docker-compose -f tools/headless_testing/docker-compose.yml up | ||
|
||
- name: Upload Test Results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Test Results | ||
path: | | ||
tools/headless_testing/testlog/results.json |