semantic-release / semantic-release/.github

make sure that the job required by branch protection doesnt result in skipped (treated as passing) when matrix jobs fail

Open
#19 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
6
Forks
5
PR merge metrics
No merged PRs in 30d

Description

minimum pipeline changes

we've seen this problem in the past but havent noticed it for a while. the conventional-changelog preset breakages highlighted that it still existed because we had several dev-dependencies merged even though they very clearly failed the tests.

to stop the bleeding specifically related to those broken updates, i updated the pipelines of the impacted repos:

we need to apply similar changes to the remaining repos in the org to avoid similar issues elsewhere

maybe rethink the required job responsibilities?

currently, we have the test job set as the required job and do linting in that job so that it has actual steps to run. however, the primary reason that job existed was to enable the branch protection since requiring checks to pass with a matrix of node versions is difficult.

with the updated steps that are specifically about coordinating the results of the needed job dependencies, should we move the linting steps out of this job? i think i lean in this direction, but open to thoughts.

steps that are not supported by all node/npm versions in our supported matrix

since we had that job available, it was a convenient job to run tasks that we needed to limit more tightly than the full test matrix. one example that comes to mind is the fact that npm audit signatures is not supported in the version of npm bundled with node v18.0.0, so it falls back to npm audit instead, which wasnt our intended check for these pipelines. if we go back to just running verification in the matrix jobs, we dont have a natural way to handle this situation.

in my other projects, i have two verification jobs, one for the matrix of supported versions defined by engines.node and another to run specifically against the "development" node version for the project, which is defined in a .nvmrc (we've talked about adding .nvmrc files to our repos, but i've failed to follow through on it. i'd like to still do this). this enables me to execute steps like this in the development job and not in the matrix job. what would we think about something like this?

an example: https://github.com/form8ion/project/blob/master/.github/workflows/node-ci.yml

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the affected repositories' GitHub Actions workflows with the referenced commits and the example .github/workflows/node-ci.yml. Inspect how the required test job coordinates the Node version matrix and dependency results, including version-specific checks such as npm audit signatures. Done means failed matrix jobs cannot leave the required check skipped or passing, while supported Node and npm checks still run appropriately.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, node.js
Domain
ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.