Commit 923a3e5
authored
Move build_tools unit tests to a standalone workflow file (#3076)
## Motivation
I'm adding a new unit test in #3057
that validates our github actions workflows. I want that test to run
when any workflow file is modified and to be a "required check" that
blocks merging. Our current filtering via
[`configure_ci.py`](https://github.com/ROCm/TheRock/blob/main/build_tools/github_actions/configure_ci.py)
has various exclusions that skip running the existing
"build_*_artifacts.yml" workflows if only "skippable paths" or "files
unrelated to CI" are modified. Rather than extend the filtering there, I
figured a standalone workflow file that always runs would be more
natural.
## Technical Details
* The new `unit_tests_summary` job gives us an anchor point that depends
on all unit test jobs (currently just the Linux and Windows matrix jobs)
to use as a required check.
* The `toJson()` code in that job is forked from the similar step in
ci.yml. Yes, it's gross. Yes, I want to move it to a reusable workflow
or script.
* Creating a standalone workflow like this will also
1. Exclude these tests from workflow runs in rocm-libraries /
rocm-systems
2. Keep these tests included when we switch from
[`ci.yml`](https://github.com/ROCm/TheRock/blob/main/.github/workflows/ci.yml)
to
[`multi_arch_ci.yml`](https://github.com/ROCm/TheRock/blob/main/.github/workflows/multi_arch_ci.yml)
* Unit tests use standard github-hosted runners and take 1 minute on
average. If we add tests that depend on self-hosted runners in some way
we could switch them over.
* Setting `GITHUB_TOKEN: ${{ github.token }}` in the env allows these
tests to run:
https://github.com/ROCm/TheRock/blob/901d88d25b246cd3af1405179b6acc31f435eb02/build_tools/github_actions/tests/github_actions_utils_test.py#L21-L29
## Test Plan
Tested in my fork:
* With tests passing:
https://github.com/ScottTodd/TheRock/actions/runs/21300728642
* With tests failing:
https://github.com/ScottTodd/TheRock/actions/runs/21300780457
Tested on this PR:
https://github.com/ROCm/TheRock/actions/runs/21368145938?pr=3076
## Test Result
Test workflow runs succeeded and failed as expected.
## Submission Checklist
- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.1 parent d072e26 commit 923a3e5
File tree
3 files changed
+72
-8
lines changed- .github/workflows
3 files changed
+72
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | 108 | | |
113 | 109 | | |
114 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | 116 | | |
121 | 117 | | |
122 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
0 commit comments