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

ci: don't run CI on draft PRs #7518

Merged
merged 14 commits into from
Feb 18, 2025
7 changes: 6 additions & 1 deletion .github/workflows/benchmarks-subsystem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ permissions:
contents: read

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
preflight:
needs: isdraft
uses: ./.github/workflows/reusable-preflight.yml

build:
timeout-minutes: 80
needs: [preflight]
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build-misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ permissions:
contents: read

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
preflight:
needs: isdraft
uses: ./.github/workflows/reusable-preflight.yml

build-runtimes-polkavm:
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/build-publish-eth-rpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled]
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -15,10 +15,16 @@ env:
ETH_RPC_IMAGE_NAME: "docker.io/paritypr/eth-rpc"

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
set-variables:
# This workaround sets the container image for each job using 'set-variables' job output.
# env variables don't work for PR from forks, so we need to use outputs.
runs-on: ubuntu-latest
needs: isdraft
outputs:
VERSION: ${{ steps.version.outputs.VERSION }}
steps:
Expand Down Expand Up @@ -77,4 +83,3 @@ jobs:
push: true
tags: |
${{ env.ETH_RPC_IMAGE_NAME }}:${{ env.VERSION }}

8 changes: 7 additions & 1 deletion .github/workflows/build-publish-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled]
types: [opened, synchronize, reopened, ready_for_review]
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -18,7 +18,13 @@ jobs:
#
#
#
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
preflight:
needs: isdraft
uses: ./.github/workflows/reusable-preflight.yml

### Build ########################
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/check-cargo-check-runtimes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ on:
# Jobs in this workflow depend on each other, only for limiting peak amount of spawned workers

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
preflight:
needs: isdraft
uses: ./.github/workflows/reusable-preflight.yml

check-runtime-assets:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/check-frame-omni-bencher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled]
types: [opened, synchronize, reopened, ready_for_review]
merge_group:

concurrency:
Expand All @@ -16,7 +16,13 @@ env:
ARTIFACTS_NAME: frame-omni-bencher-artifacts

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
preflight:
needs: isdraft
uses: ./.github/workflows/reusable-preflight.yml

quick-benchmarks-omni:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/check-getting-started.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,22 @@ on:
paths:
- ".github/workflows/check-getting-started.yml"
- "scripts/getting-started.sh"
types: [opened, synchronize, reopened, ready_for_review]
schedule:
- cron: "0 5 * * *"
workflow_dispatch:

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

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
check-getting-started:
needs: isdraft
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -179,6 +185,7 @@ jobs:
timeout-minutes: 5

check-getting-started-macos:
needs: isdraft
strategy:
fail-fast: true
matrix:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/check-licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Check licenses

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:

concurrency:
Expand All @@ -12,8 +13,14 @@ permissions:
packages: read

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
check-licenses:
runs-on: ubuntu-latest
needs: isdraft
timeout-minutes: 10
env:
LICENSES: "'Apache-2.0' 'GPL-3.0-only' 'GPL-3.0-or-later WITH Classpath-exception-2.0' 'MIT-0' 'Unlicense'"
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@ permissions:
packages: read

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
link-checker:
runs-on: ubuntu-latest
needs: isdraft
timeout-minutes: 10
steps:
- name: Restore lychee cache
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/check-runtime-migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ concurrency:
permissions: {}

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
preflight:
needs: isdraft
uses: ./.github/workflows/reusable-preflight.yml

# More info can be found here: https://github.com/paritytech/polkadot/pull/5865
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/check-semver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ env:
TOOLCHAIN: nightly-2024-11-19

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
preflight:
needs: isdraft
uses: ./.github/workflows/reusable-preflight.yml
check-semver:
runs-on: ubuntu-latest
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/checks-quick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ concurrency:
permissions: {}

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
preflight:
needs: isdraft
uses: ./.github/workflows/reusable-preflight.yml

fmt:
Expand All @@ -37,6 +43,7 @@ jobs:
app-key: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_KEY }}
check-dependency-rules:
runs-on: ubuntu-latest
needs: isdraft
timeout-minutes: 20
steps:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
Expand Down Expand Up @@ -84,6 +91,7 @@ jobs:
echo "Please run `taplo format --config .config/taplo.toml` to fix any toml formatting issues"
check-workspace:
runs-on: ubuntu-latest
needs: isdraft
timeout-minutes: 20
steps:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.0 (22. Sep 2023)
Expand All @@ -102,6 +110,7 @@ jobs:
run: python3 .github/scripts/deny-git-deps.py .
check-markdown:
runs-on: ubuntu-latest
needs: isdraft
timeout-minutes: 20
steps:
- name: Checkout sources
Expand Down Expand Up @@ -154,6 +163,7 @@ jobs:
fi
check-fail-ci:
runs-on: ubuntu-latest
needs: isdraft
container:
# there's no "rg" in ci-unified, and tools is a smaller image anyway
image: "paritytech/tools:latest"
Expand All @@ -179,6 +189,7 @@ jobs:
GIT_DEPTH: 1
check-readme:
runs-on: ubuntu-latest
needs: isdraft
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ concurrency:
permissions: {}

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
preflight:
needs: isdraft
uses: ./.github/workflows/reusable-preflight.yml

cargo-clippy:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/cmd-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Command Bot Tests

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read
Expand All @@ -11,8 +12,14 @@ concurrency:
cancel-in-progress: true

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
test-cmd-bot:
runs-on: ubuntu-latest
needs: [isdraft]
steps:
- uses: actions/checkout@v4
- run: python3 .github/scripts/cmd/test_cmd.py
9 changes: 8 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@ on:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled]
types: [opened, synchronize, reopened, ready_for_review]
merge_group:

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

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
preflight:
needs: isdraft
uses: ./.github/workflows/reusable-preflight.yml

test-doc:
Expand Down Expand Up @@ -77,6 +83,7 @@ jobs:

build-implementers-guide:
runs-on: ubuntu-latest
needs: isdraft
container:
image: paritytech/mdbook-utils:e14aae4a-20221123
options: --user root
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/publish-check-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ concurrency:
cancel-in-progress: true

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
preflight:
needs: isdraft
uses: ./.github/workflows/reusable-preflight.yml

check-publish-compile:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/publish-check-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ concurrency:
cancel-in-progress: true

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
check-publish:
runs-on: ubuntu-latest
needs: isdraft
steps:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/tests-linux-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ concurrency:
cancel-in-progress: true

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
preflight:
needs: isdraft
uses: ./.github/workflows/reusable-preflight.yml

test-linux-stable-int:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/tests-misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ concurrency:
# Jobs in this workflow depend on each other, only for limiting peak amount of spawned workers

jobs:
isdraft:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- run: echo "PR is not draft, starting CI"
preflight:
needs: isdraft
uses: ./.github/workflows/reusable-preflight.yml

# more information about this job can be found here:
Expand Down
Loading
Loading