Skip to content

Two active workflows named Tests, and #106 would merge a second one rather than replace the first #146

Description

@gaurav

The repository has two active workflows called Tests:

337275603  .github/workflows/test.yml    (only on split/2-top-level-package, PR #106)
242239593  .github/workflows/tests.yaml  (on main)

GitHub registers a workflow per branch, not per default branch, so both are live now even though only one is on main. The immediate symptom is that anything selecting a workflow by name is ambiguous:

$ gh run list --branch milestones-page --workflow Tests
could not resolve to a unique workflow; found: test.yml tests.yaml

That is an annoyance. The reason to deal with it before #106 merges is bigger.

They do not replace each other

split/2-top-level-package forked before tests.yaml landed on main, and it does not contain tests.yaml — its .github/workflows/ holds only deploy-website-to-gh-pages.yaml, scala.yml and test.yml. So merging #106 does not replace the current Tests workflow; it adds a second one alongside it. After that merge every pull request runs two workflows both named Tests, each with its own unit-test job, against the same commit. Neither is wrong, both are slow, and a red tick will not say which one.

There is also a trigger difference to reconcile rather than average: tests.yaml is on: pull_request only, while test.yml adds workflow_dispatch and push: branches: [main].

The branch's version is the better one, which is why this is not just "delete it"

test.yml is not a stale copy — it is ahead of main in several ways worth keeping:

Meanwhile main's tests.yaml has the website-tests job (vitest, Node 24 pinned) that test.yml knows nothing about, and a long comment explaining why the unit-test job gets no GITHUB_TOKEN.

So the fix is a merge of intent, not a deletion: one file, one name, with the lint job, the collect-only check, the website job and the Node 24 pin all present, and one set of triggers. Most cheaply done on #106 before it merges, since that is the PR that would otherwise create the duplicate — merge main into it, delete test.yml, and fold its two extra jobs into tests.yaml.

Until then

gh run list/gh workflow run need --workflow tests.yaml (the filename) rather than --workflow Tests.

Noticed while running gh run list --workflow Tests during #112. Not caused by either PR; #112's description previously recorded this as resolved by time, which was wrong — test.yml being off main is not the same as it being gone.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions