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
52 changes: 31 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]

merge_group:

jobs:
build:
Expand Down Expand Up @@ -74,26 +74,36 @@ jobs:
env:
MAVEN_OPTS: -Xmx2g

# the following is what matsim-libs has. Don't know why it is needed. kai, apr'26

verify-all-jobs-successful:
# always() - to ensure this job is executed (regardless of the status of the previous job)
# run if push or pull_requests from fork
if: always() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
needs: build
test_all:
runs-on: ubuntu-latest
needs: build
if: always()
steps:
- run: |
if [[ "${{ needs.build.result }}" != "success" ]]; then
exit 1
fi

# When running this workflow for internal PRs "verify-all-jobs-successful" is marked as skipped,
# which GitHub takes as a green flag and will allow merging before "verify-all-jobs-successful"
# is completed for the push event.
# One way to avoid this is to create a job from a matrix on the fly. They will be created for
# push events and PR events from forks (but not for PR events coming from internal forks),
# so we can safely add a check "verify-all-jobs-successful (push-or-external-PR)"
strategy:
matrix:
name: [ "push-or-external-PR" ]
# the following is what matsim-libs has. Don't know why it is needed. kai, apr'26

steps:
- name: check if the whole job matrix is successful
if: needs.build.result != 'success'
run: exit 1 # fail if "build" was not successful
# verify-all-jobs-successful:
# # always() - to ensure this job is executed (regardless of the status of the previous job)
# # run if push or pull_requests from fork
# if: always() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
# needs: build
# runs-on: ubuntu-latest

# # When running this workflow for internal PRs "verify-all-jobs-successful" is marked as skipped,
# # which GitHub takes as a green flag and will allow merging before "verify-all-jobs-successful"
# # is completed for the push event.
# # One way to avoid this is to create a job from a matrix on the fly. They will be created for
# # push events and PR events from forks (but not for PR events coming from internal forks),
# # so we can safely add a check "verify-all-jobs-successful (push-or-external-PR)"
# strategy:
# matrix:
# name: [ "push-or-external-PR" ]

# steps:
# - name: check if the whole job matrix is successful
# if: needs.build.result != 'success'
# run: exit 1 # fail if "build" was not successful
Loading