Commit b908924
committed
ci: fix WindowsOnly test filtering on non-Windows platforms
Problem:
- Job names showed ugly filters: "test (ubuntu-latest, & TestCategory!=WindowsOnly)"
- WindowsOnly tests were running on Ubuntu/macOS and failing
- Two conflicting WindowsOnlyAttribute classes caused namespace shadowing
Root cause:
- Commit 3c8350b added WindowsOnlyAttribute : CategoryAttribute in TestCategory.cs
- This shadowed the existing Utilities/WindowsOnlyAttribute : SkipAttribute
- Tests resolved [WindowsOnly] to the CategoryAttribute version (no skip behavior)
- The CI workflow was simplified to remove the extra_filter matrix
Fix:
- Remove Utilities/WindowsOnlyAttribute.cs (eliminates namespace conflict)
- Compute filter dynamically in workflow step using $RUNNER_OS
- OpenBugs: excluded on all platforms (global)
- WindowsOnly: excluded only on non-Windows (conditional)
Result:
- Clean job names: "test (ubuntu-latest)", "test (windows-latest)", etc.
- WindowsOnly tests correctly skipped on Ubuntu/macOS
- Single [WindowsOnly] attribute with clear semantics1 parent 07f908d commit b908924
3 files changed
Lines changed: 18 additions & 28 deletions
File tree
- .github/workflows
- test/NumSharp.UnitTest
- Utilities
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | 21 | | |
29 | 22 | | |
30 | 23 | | |
| |||
50 | 43 | | |
51 | 44 | | |
52 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
53 | 50 | | |
54 | 51 | | |
55 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | | - | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
133 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
134 | 139 | | |
135 | 140 | | |
136 | 141 | | |
| |||
This file was deleted.
0 commit comments