Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure GitHub CI fails when tests are skipped due to a build failure #4368

Merged
merged 1 commit into from
May 29, 2024

Conversation

neilmayhew
Copy link
Contributor

Description

When one of the matrix jobs for build fails, the test job is skipped and the logic in complete was not treating this as a failure. As a result, PRs were being merged that contained build failures and hadn't passed tests.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages. New section is never added with the code changes. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@neilmayhew neilmayhew requested a review from teodanciu May 28, 2024 16:02
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thank you for fixing this

@neilmayhew neilmayhew force-pushed the neilmayhew/ci-tests-skipped branch from 6dbc605 to 7910595 Compare May 28, 2024 17:07
@neilmayhew neilmayhew enabled auto-merge (squash) May 28, 2024 17:08
Copy link
Contributor

@teodanciu teodanciu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I expected the PR to successfully fail, but it succeeded! Maybe it's not rebased against master?
We should probably see it it fail with the current master, then merge it once Joosep's PR that contains the fix is in.

@neilmayhew
Copy link
Contributor Author

Hm, I expected the PR to successfully fail, but it succeeded! Maybe it's not rebased against master? We should probably see it it fail with the current master, then merge it once Joosep's PR that contains the fix is in.

@teodanciu It did fail, before and after rebasing. The message (in the "Tests completed" job) was "Tests were skipped" and the exit code was 1.

@neilmayhew
Copy link
Contributor Author

@lehins Do you want us to wait until master is fixed, or would you like to admin-merge this?

@teodanciu teodanciu force-pushed the neilmayhew/ci-tests-skipped branch from 7910595 to 8c21ff5 Compare May 29, 2024 07:49
@neilmayhew neilmayhew merged commit e30e474 into master May 29, 2024
124 of 126 checks passed
@neilmayhew neilmayhew deleted the neilmayhew/ci-tests-skipped branch May 29, 2024 11:16
@teodanciu
Copy link
Contributor

Merged this, I reckon it's better to have this check in sooner rather than later.

@neilmayhew
Copy link
Contributor Author

Merged this, I reckon it's better to have this check in sooner rather than later.

Thank you! I agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants