Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ on:
pull_request:
branches: [ main ]
workflow_dispatch:
merge_group:

env:
# Something seems to be setting this in the default GHA runners, which breaks bcvk
# as the default runner user doesn't have access
LIBVIRT_DEFAULT_URI: "qemu:///session"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-macos:
Expand Down Expand Up @@ -192,14 +196,20 @@ jobs:
path: target/nextest/integration/junit.xml
retention-days: 7

# Sentinel job for required checks - configure this job name in repository settings
# Sentinel job for required checks - configure this job name in repository settings.
# Accepts 'skipped' as success so that merge_group-only jobs don't block PRs.
required-checks:
if: always()
needs: [build-macos, build, integration-tests]
runs-on: ubuntu-latest
steps:
- run: exit 1
if: >-
needs.build-macos.result != 'success' ||
needs.build.result != 'success' ||
needs.integration-tests.result != 'success'
- name: Check all jobs
env:
NEEDS: ${{ toJson(needs) }}
run: |
FAILED=$(echo "$NEEDS" | jq -r 'to_entries[] | select(.value.result | IN("success","skipped") | not) | .key')
if [ -n "$FAILED" ]; then
echo "The following jobs did not succeed: $FAILED"
exit 1
fi
echo "All jobs succeeded or were skipped."
Loading