|
1 | | -# Placeholder until Story 6.5 ships tests/mainnet_smoke.rs and the |
2 | | -# mainnet-smoke cargo feature. The job is fully gated on the existence of |
3 | | -# `tests/mainnet_smoke.rs` so the cron stays a no-op until then — without |
4 | | -# the guard, the cron would be permanently red on Day 1 because the feature |
5 | | -# and the test file do not yet exist. |
6 | 1 | name: Nightly Mainnet Smoke |
7 | 2 |
|
8 | 3 | on: |
@@ -38,24 +33,19 @@ jobs: |
38 | 33 | # level forces job status to success and silently kills the notification |
39 | 34 | # path. |
40 | 35 | # |
41 | | - # Soft-gate: this workflow is a no-op until Story 6.5 ships the test file |
42 | | - # AND the `mainnet-smoke` cargo feature. Without this guard, |
43 | | - # `cargo test --features mainnet-smoke` would error out with |
44 | | - # "feature `mainnet-smoke` does not exist" and the cron would be red. |
45 | | - if: hashFiles('tests/mainnet_smoke.rs') != '' |
| 36 | + # The `Verify mainnet-smoke cargo feature exists` step below gates all |
| 37 | + # subsequent steps — if the cargo feature is absent it short-circuits |
| 38 | + # cleanly without failing the workflow. |
46 | 39 | steps: |
47 | 40 | - uses: actions/checkout@v4 |
48 | 41 | with: |
49 | 42 | fetch-depth: 1 |
50 | 43 | - name: Verify mainnet-smoke cargo feature exists |
51 | 44 | id: feature_check |
52 | | - # Belt-and-braces guard alongside the job-level `hashFiles` check — |
53 | 45 | # `tests/mainnet_smoke.rs` and `[features] mainnet-smoke = []` may |
54 | | - # land in separate PRs, and the cargo feature must exist before |
55 | | - # `cargo test --features mainnet-smoke` is run. We set an output |
56 | | - # rather than failing the step so the rest of the job can short- |
57 | | - # circuit cleanly via `if:` (GitHub Actions has no native "skip" |
58 | | - # exit code). |
| 46 | + # land in separate PRs. We set an output rather than failing the step |
| 47 | + # so the rest of the job can short-circuit cleanly via `if:` (GitHub |
| 48 | + # Actions has no native "skip" exit code). |
59 | 49 | run: | |
60 | 50 | if grep -q '^mainnet-smoke\b' Cargo.toml; then |
61 | 51 | echo "feature_present=true" >> "$GITHUB_OUTPUT" |
|
0 commit comments