Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

CI: keep a test (windows-latest) check that reports the test result

Ivan4a930959393b
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 823232cb3..8552311bf 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -193,6 +193,24 @@ jobs:
if: runner.os == 'Linux'
run: cargo xtask scorecard --check
+ # The Windows tests used to be one job named `test (windows-latest)`; they're now legs named
+ # `test (windows-latest, unit)` and `test (windows-latest, integration)`. This job keeps the old
+ # name reporting, so a required status check on it (none today) would keep working. It fails
+ # unless the whole test matrix passed, Linux included, since `needs` reports one result for all
+ # legs; when a PR runs no Windows legs it passes along the Linux result.
+ windows-gate:
+ name: test (windows-latest)
+ needs: [platforms, test]
+ if: always()
+ runs-on: ubuntu-latest
+ steps:
+ - env:
+ PLATFORMS: ${{ needs.platforms.result }}
+ TEST: ${{ needs.test.result }}
+ run: |
+ echo "platforms: $PLATFORMS, test: $TEST"
+ [ "$PLATFORMS" = success ] && [ "$TEST" = success ]
+
# The two other builds of the Linux tests, in parallel with the test job instead of after it (they
# added ~10 min to its critical path). Each restores the test job's cache (`shared-key: test` is
# that job's key) and saves none: the dependencies are the same, and the 10 GB cache budget is