Skip to content

A convention test holds every piped run: script of a workflow to pipefail #160

Open

Description

@CaffeinatedCoder

The guard #150 leaves owed. #158 fixes the defect; nothing yet fails when it comes back.

What it holds

A run: script of a workflow that pipes runs with pipefail in effect. Without it the status of dotnet test … | tee is tee's, and a step whose tests failed is green: #150, seen in CI on 2026-11-16 (green with a failing test in each lane, the same lanes called as release.yml calls them).

pipefail is in effect when one of these is true of the step:

A workflow that is called takes nothing from its caller: release.yml sets the default, and the lanes of dotnet.yml it calls ran as bash -e {0} all the same (the second run above). So the rule is asked of each file by itself.

Where it goes

test/CodoMetis.EFCore.SchemaKit.Tests/Conventions/WorkflowGateConventionTests.cs, beside the tests of the gate, read through Harness/WorkflowFile.cs. Both arrive with #154 and are not on main yet, which is why this was not written with #158. A lane that cannot fail is the same decay as a lane the gate does not need: the gate sees success.

Over WorkflowFile.All(), so that nightly.yml (#154) and a workflow added later are held to it as well.

Done when

The test is on main and has been seen to fail each way the rule can break: the defaults: block taken out of dotnet.yml, a step given a shell: of its own without pipefail, a job given defaults that take it away.

Blocked by #154.

Activity

  1. added this to the 11.0.0 milestone on Nov 16, 2026
  2. added
    tests
    area/release
    on Nov 16, 2026
  3. CaffeinatedCoder commented on Nov 16, 2026

    @CaffeinatedCoder
    OwnerAuthor

    A note from #154, for whoever writes this test. I am not taking the issue over.

    #154 changed Harness/WorkflowFile.cs on the way (branch chore/35-port-conventions, b0e5e0d, not merged yet), and part of what this test needs is in it now.

    What is there

    • Pipefail(job, step) says whether a step runs with pipefail, by the shell it is given: the step's own shell:, else the job's defaults: run: shell, else the workflow's. The nearest of the three decides, bash is true and no shell is false. It reads one file by itself, so a called workflow takes nothing from its caller. That is the first bullet of "What it holds".
    • RunStep asks it, so the tests of test: the rest of the 5.x port: convention tests, nightly.yml, the SBOMs and the skills #154 that run a step's lines run them as a runner does: bash -e where no shell is stated, bash --noprofile --norc -eo pipefail where it is. Rebased onto main with fix: a failing test fails the Test and Integration tests steps #158, the gate's script runs with pipefail.
    • WorkflowFile.All() and Jobs, and WorkflowFile.Parse(fileName, text) for a workflow written in a test. WorkflowFileTests has one that states a shell in each of the three places, and shows false | cat leaving 0 without pipefail and 1 with it.
    • A job is read whatever stands behind its key, and one this reader cannot read fails the load. So "over WorkflowFile.All()" passes over no job.

    What is not, and this test needs

    • A way to every step. Step, Run and Pipefail find a step by its name:. pr-hygiene.yml has a step that is - run: with no name, and no defaults, so it runs as bash -e.
    • A script that is not a run: | block. Run reads that form alone; dotnet.yml and release.yml have three one-line run: steps and one folded run: >.
    • An answer for another shell. Pipefail fails on a shell: that is not bash ("these tests run a step with bash") and does not say false. The second break of "Done when", a step given a shell: of its own without pipefail, needs false there.
    • The second bullet of "What it holds": nothing reads a script for set -o pipefail before its first pipe.

    One thing the rule may want to say: the nameless step of pr-hygiene.yml calls .github/scripts/pr-hygiene.sh, so its run: has no pipe and the script it calls pipes in two places. That script sets set -euo pipefail itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/releasetests

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions