Skip to content

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

@travi

Description

@travi

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

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