Skip to content

Commit

Permalink
CI(build-and-test): add conclusion job (#8246)
Browse files Browse the repository at this point in the history
## Problem

Currently, if you need to rename a job and the job is listed in [branch
protection
rules](https://github.com/neondatabase/neon/settings/branch_protection_rules),
the PR won't be allowed to merge.

## Summary of changes
- Add `conclusion` job that fails if any of its dependencies don't
finish successfully
  • Loading branch information
bayandin committed Jul 4, 2024
1 parent e03c3c9 commit 5b69b32
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1368,3 +1368,31 @@ jobs:
with:
from-tag: ${{ needs.build-build-tools-image.outputs.image-tag }}
secrets: inherit

# This job simplifies setting branch protection rules (in GitHub UI)
# by allowing to set only this job instead of listing many others.
# It also makes it easier to rename or parametrise jobs (using matrix)
# which requires changes in branch protection rules
#
# Note, that we can't add external check (like `neon-cloud-e2e`) we still need to use GitHub UI for that.
#
# https://github.com/neondatabase/neon/settings/branch_protection_rules
conclusion:
if: always()
# Format `needs` differently to make the list more readable.
# Usually we do `needs: [...]`
needs:
- check-codestyle-python
- check-codestyle-rust
- regress-tests
- test-images
runs-on: ubuntu-22.04
steps:
# The list of possible results:
# https://docs.github.com/en/actions/learn-github-actions/contexts#needs-context
- name: Fail the job if any of the dependencies do not succeed
run: exit 1
if: |
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
|| contains(needs.*.result, 'skipped')

1 comment on commit 5b69b32

@github-actions
Copy link

@github-actions github-actions bot commented on 5b69b32 Jul 4, 2024

Choose a reason for hiding this comment

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

3118 tests run: 2991 passed, 0 failed, 127 skipped (full report)


Flaky tests (1)

Postgres 14

  • test_pg_regress[None]: debug

Code coverage* (full report)

  • functions: 32.7% (6937 of 21223 functions)
  • lines: 50.1% (54439 of 108707 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
5b69b32 at 2024-07-04T12:48:21.069Z :recycle:

Please sign in to comment.