Kept the coverage publish on master, where the environment allows it (#654)

Running the regression suites on dev (#652) was meant to test the branch the
pull requests target. It changed what gets published as well, which was not
intended and does not work: the first push to dev after that merge failed
with

    Branch "dev" is not allowed to deploy to github-pages due to
    environment protection rules.

All three suites passed in that run -- tx, smp and freertos. The only
failure was deploy / deploy_code_coverage, rejected before it ran, because
the github-pages environment restricts deployments to master.

The guard goes here rather than in the environment settings, because the
environment rule is doing its job. Which branch the published coverage
report describes is a deliberate decision, and moving it from master to dev
is a change worth making on purpose rather than as a side effect of a
trigger fix. Doing so needs the environment setting relaxed as well as this
line removed.

The per-suite deploy_code_coverage jobs need no guard: tx, smp and freertos
all pass skip_deploy: true, and regression_template.yml already restricts
that job to push and workflow_dispatch. Only the deploy job, which is the
one that publishes, was reaching the environment.

Assisted-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Frédéric Desbiens
2026-08-24 13:07:38 -04:00
committed by GitHub
parent 977e14e776
commit 9218bad4bc
+14
View File
@@ -89,6 +89,20 @@ jobs:
# skip_deploy: true
# skip_coverage: true
deploy:
# Publishing the coverage report stays on master. Adding dev to this
# workflow's triggers was meant to run the suites on the branch the pull
# requests target, not to change what gets published -- and the first
# push to dev after that change failed here with 'Branch "dev" is not
# allowed to deploy to github-pages due to environment protection rules',
# while all three suites passed. The github-pages environment restricts
# deployments to master, so the job was rejected before it ran.
#
# Guarding here rather than relaxing the environment rule, because the
# rule is doing its job: it is a deliberate answer to the question of
# which branch the published report describes. Moving that answer to dev
# is a separate decision, and it needs the environment setting changed
# as well as this line removed.
if: github.ref == 'refs/heads/master'
permissions:
contents: read
issues: read