mirror of
https://github.com/cozystack/cozystack.git
synced 2026-10-27 07:14:04 +09:00
Three review nits, all verified against the tree, plus a tighter scope than the first attempt at them. The behaviour suite asserted "promote-rc does not trim the rc tag" against the whole file. promote-rc.yaml has no .trim() today, so it passed, but any unrelated .trim() added anywhere in the workflow would have failed a test about tag policy. Scoping it to the parse JOB was not enough either: that job is ~180 lines, most of them the e2e gate's github-script, whose string handling has nothing to do with tag policy. Both greps are now scoped to the parse STEP, and run through a code_lines filter copied from the contract suite so a YAML comment mentioning .trim() cannot fail them. Mutation-checked in both directions: a .trim() injected into the parse step fails the test, one injected into the e2e-gate step of the same job does not. - The Step 2 checklist entry still said "must be main" while Step 2 itself now lists three valid starting points (main, detached at the release tag, detached at the rc tag being promoted). The checklist is what an agent ticks off, so it was the half that mattered; it now points at Step 2 rather than re-encoding the count, so a fourth configuration cannot desync it. The heading said "Checking current branch", which two of the three states do not have. - hack/testdata/needs-semantics.yaml named release-changelog-contract.bats as its consumer; the only consumer is release-changelog-behaviour.bats. 50/50 tests green across the three suites (11 + 24 + 15). Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
37 lines
1.3 KiB
YAML
37 lines
1.3 KiB
YAML
# Fixture for hack/release-changelog-behaviour.bats: proves, by RUNNING it, the
|
|
# GitHub Actions semantics promote-rc.yaml depends on — that a job needing a
|
|
# FAILED job still runs when its `if:` gates only on a different, successful one.
|
|
# Mirrors the promote / changelog / open-pr shapes exactly.
|
|
name: needs-semantics-fixture
|
|
on: [push]
|
|
jobs:
|
|
promote:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
stable_version: ${{ steps.p.outputs.stable_version }}
|
|
steps:
|
|
- id: p
|
|
run: echo "stable_version=1.6.0" >> "$GITHUB_OUTPUT"
|
|
|
|
changelog:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
present: ${{ steps.v.outputs.present }}
|
|
steps:
|
|
# Stands in for `npm i -g @github/copilot` failing: a fatal step in the
|
|
# changelog job that is NOT the continue-on-error AI step.
|
|
- run: exit 1
|
|
- id: v
|
|
run: echo "present=true" >> "$GITHUB_OUTPUT"
|
|
|
|
open-pr:
|
|
runs-on: ubuntu-latest
|
|
needs: [promote, changelog]
|
|
if: ${{ !cancelled() && needs.promote.result == 'success' }}
|
|
steps:
|
|
- run: |
|
|
echo "OPEN_PR_RAN=yes"
|
|
echo "changelog_result=${{ needs.changelog.result }}"
|
|
echo "changelog_present=[${{ needs.changelog.outputs.present }}]"
|
|
echo "stable_version=[${{ needs.promote.outputs.stable_version }}]"
|