Skip to content

Commit

Permalink
Avoid running GitHub CI if PR has conflicts (#4489) (#4492)
Browse files Browse the repository at this point in the history
* Refs #20486: Avoid running GitHub CI if PR has conflicts

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #20486: Add missing job

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

---------

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
(cherry picked from commit 3ed793c)

Co-authored-by: Jesús Poderoso <120394830+JesusPoderoso@users.noreply.github.com>
  • Loading branch information
2 people authored and cferreiragonz committed Mar 11, 2024
1 parent 1c7fda0 commit dab19b7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/documentation-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ env:
jobs:
ubuntu-build-and-test-documentation:
name: Documentation build and test

if: ${{ !(contains(github.event.pull_request.labels.*.name, 'no-test') ||
contains(github.event.pull_request.labels.*.name, 'skip-ci')) }}
if: ${{ !(contains(github.event.pull_request.labels.*.name, 'skip-ci') ||
contains(github.event.pull_request.labels.*.name, 'conflicts')) }}

runs-on: ubuntu-22.04
steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/mac-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ concurrency:
jobs:
mac-ci:
uses: ./.github/workflows/reusable-mac-ci.yml
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
if: ${{ !(contains(github.event.pull_request.labels.*.name, 'skip-ci') ||
contains(github.event.pull_request.labels.*.name, 'conflicts')) }}
with:
label: ${{ inputs.label || 'mac-ci' }}
colcon-args: ${{ inputs.colcon-args }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/sanitizer-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
asan-test:

if: ${{ !(contains(github.event.pull_request.labels.*.name, 'no-test') ||
contains(github.event.pull_request.labels.*.name, 'skip-ci')) }}
contains(github.event.pull_request.labels.*.name, 'skip-ci') ||
contains(github.event.pull_request.labels.*.name, 'conflicts')) }}

runs-on: ubuntu-22.04

Expand Down Expand Up @@ -113,7 +114,8 @@ jobs:
asan-discovery-server-test:

if: ${{ !(contains(github.event.pull_request.labels.*.name, 'no-test') ||
contains(github.event.pull_request.labels.*.name, 'skip-ci')) }}
contains(github.event.pull_request.labels.*.name, 'skip-ci') ||
contains(github.event.pull_request.labels.*.name, 'conflicts')) }}

runs-on: ubuntu-22.04

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/thread-sanitizer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ jobs:
name: Sanitizer Evaluation

if: ${{ !(contains(github.event.pull_request.labels.*.name, 'no-test') ||
contains(github.event.pull_request.labels.*.name, 'skip-ci')) }}
contains(github.event.pull_request.labels.*.name, 'skip-ci') ||
contains(github.event.pull_request.labels.*.name, 'conflicts')) }}

runs-on: ubuntu-22.04

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ concurrency:
jobs:
windows-ci:
uses: ./.github/workflows/reusable-windows-ci.yml
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
if: ${{ !(contains(github.event.pull_request.labels.*.name, 'skip-ci') ||
contains(github.event.pull_request.labels.*.name, 'conflicts')) }}
with:
label: ${{ inputs.label || 'windows-ci' }}
colcon-args: ${{ inputs.colcon-args }}
Expand Down

0 comments on commit dab19b7

Please sign in to comment.