diff --git a/.github/workflows/benchmarks-subsystem.yml b/.github/workflows/benchmarks-subsystem.yml index 210714d847ff032dee89a4dfbd36e9a34b7f5940..82aff7e694f9b241f7d27c867559ae739ee7f1b8 100644 --- a/.github/workflows/benchmarks-subsystem.yml +++ b/.github/workflows/benchmarks-subsystem.yml @@ -16,9 +16,11 @@ permissions: contents: read jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml preflight: + needs: isdraft uses: ./.github/workflows/reusable-preflight.yml - build: timeout-minutes: 80 needs: [preflight] diff --git a/.github/workflows/build-misc.yml b/.github/workflows/build-misc.yml index e1ef29f305d0f1e97866d84a83a960a04734b76c..fc29bfb7b34376612868c574901d8a86719ccc9a 100644 --- a/.github/workflows/build-misc.yml +++ b/.github/workflows/build-misc.yml @@ -16,7 +16,10 @@ permissions: contents: read jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml preflight: + needs: isdraft uses: ./.github/workflows/reusable-preflight.yml build-runtimes-polkavm: diff --git a/.github/workflows/build-publish-eth-rpc.yml b/.github/workflows/build-publish-eth-rpc.yml index 621ac3cd44c3c49d474f420979f2d318720c18ca..e576f3b7938043f48c8f49843e7baa6032d35b27 100644 --- a/.github/workflows/build-publish-eth-rpc.yml +++ b/.github/workflows/build-publish-eth-rpc.yml @@ -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 }} @@ -15,10 +15,13 @@ env: ETH_RPC_IMAGE_NAME: "docker.io/paritypr/eth-rpc" jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml 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: @@ -77,4 +80,3 @@ jobs: push: true tags: | ${{ env.ETH_RPC_IMAGE_NAME }}:${{ env.VERSION }} - diff --git a/.github/workflows/build-publish-images.yml b/.github/workflows/build-publish-images.yml index 0bf2bded0b0dfeaeb784c985d84ad0d4bef709c5..0ce33e2864a41fcf2d8a0a49b59a66932f0eba95 100644 --- a/.github/workflows/build-publish-images.yml +++ b/.github/workflows/build-publish-images.yml @@ -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 }} @@ -18,7 +18,10 @@ jobs: # # # + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml preflight: + needs: isdraft uses: ./.github/workflows/reusable-preflight.yml ### Build ######################## diff --git a/.github/workflows/check-cargo-check-runtimes.yml b/.github/workflows/check-cargo-check-runtimes.yml index 376c34d1f25fd965f69f3c2874b38c39e6a76573..c4ad0f3d139de40908415c9d6c1202d22f38d339 100644 --- a/.github/workflows/check-cargo-check-runtimes.yml +++ b/.github/workflows/check-cargo-check-runtimes.yml @@ -13,7 +13,10 @@ on: # Jobs in this workflow depend on each other, only for limiting peak amount of spawned workers jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml preflight: + needs: isdraft uses: ./.github/workflows/reusable-preflight.yml check-runtime-assets: diff --git a/.github/workflows/check-frame-omni-bencher.yml b/.github/workflows/check-frame-omni-bencher.yml index bc0ff82b677414d82b9e5724f3fa0b46612436dc..f4227cf5a6a662e1d1d36d487ca60c935c93b5c6 100644 --- a/.github/workflows/check-frame-omni-bencher.yml +++ b/.github/workflows/check-frame-omni-bencher.yml @@ -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: @@ -16,7 +16,10 @@ env: ARTIFACTS_NAME: frame-omni-bencher-artifacts jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml preflight: + needs: isdraft uses: ./.github/workflows/reusable-preflight.yml quick-benchmarks-omni: diff --git a/.github/workflows/check-getting-started.yml b/.github/workflows/check-getting-started.yml index 0661fa144348de687c0ddf1266be593664adc5e4..4178016bc25f8e0bf21ba89b3879d428a11ff8ac 100644 --- a/.github/workflows/check-getting-started.yml +++ b/.github/workflows/check-getting-started.yml @@ -26,16 +26,19 @@ 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: + uses: ./.github/workflows/reusable-isdraft.yml check-getting-started: + needs: isdraft strategy: fail-fast: true matrix: @@ -179,6 +182,7 @@ jobs: timeout-minutes: 5 check-getting-started-macos: + needs: isdraft strategy: fail-fast: true matrix: diff --git a/.github/workflows/check-licenses.yml b/.github/workflows/check-licenses.yml index 9492d06c7fcf93dac1d4741bb2b4580d9e187dee..70f374142dc011202cbe80786f62869a3a419c1f 100644 --- a/.github/workflows/check-licenses.yml +++ b/.github/workflows/check-licenses.yml @@ -2,6 +2,7 @@ name: Check licenses on: pull_request: + types: [opened, synchronize, reopened, ready_for_review] merge_group: concurrency: @@ -12,8 +13,11 @@ permissions: packages: read jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml 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'" diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 81ce23492c721b6d87fb0ef712a8c71d49a18197..6d5a79ff34a3f0da9b12fc4da0d5e29b02971745 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -18,8 +18,11 @@ permissions: packages: read jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml link-checker: runs-on: ubuntu-latest + needs: isdraft timeout-minutes: 10 steps: - name: Restore lychee cache diff --git a/.github/workflows/check-runtime-migration.yml b/.github/workflows/check-runtime-migration.yml index e935f1cb44981e07f06cfeb74811fec29e9f41a3..0596bab3ae82c16c3ddda95d021e1d5d9a6517e1 100644 --- a/.github/workflows/check-runtime-migration.yml +++ b/.github/workflows/check-runtime-migration.yml @@ -19,7 +19,10 @@ concurrency: permissions: {} jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml preflight: + needs: isdraft uses: ./.github/workflows/reusable-preflight.yml # More info can be found here: https://github.com/paritytech/polkadot/pull/5865 diff --git a/.github/workflows/check-semver.yml b/.github/workflows/check-semver.yml index a6e90cee53470810959941e4d86832c1b28bddd3..958a1590bd2488d796a22f3b32f49b3b028113e6 100644 --- a/.github/workflows/check-semver.yml +++ b/.github/workflows/check-semver.yml @@ -14,7 +14,10 @@ env: TOOLCHAIN: nightly-2024-11-19 jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml preflight: + needs: isdraft uses: ./.github/workflows/reusable-preflight.yml check-semver: runs-on: ubuntu-latest diff --git a/.github/workflows/checks-quick.yml b/.github/workflows/checks-quick.yml index 1a8813833deff8cccb412d832a38de470e0dc933..ff88fa6ff9f722f9b07f819088b631d7e608320f 100644 --- a/.github/workflows/checks-quick.yml +++ b/.github/workflows/checks-quick.yml @@ -15,7 +15,10 @@ concurrency: permissions: {} jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml preflight: + needs: isdraft uses: ./.github/workflows/reusable-preflight.yml fmt: @@ -37,6 +40,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 @@ -84,6 +88,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) @@ -102,6 +107,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 @@ -154,6 +160,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" @@ -179,6 +186,7 @@ jobs: GIT_DEPTH: 1 check-readme: runs-on: ubuntu-latest + needs: isdraft timeout-minutes: 10 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 02428711811f957e35de0cf27af8ba51f9c40547..d1d97534d9e1803a00f05da01dc6fa5a5ff801cb 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -15,7 +15,10 @@ concurrency: permissions: {} jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml preflight: + needs: isdraft uses: ./.github/workflows/reusable-preflight.yml cargo-clippy: diff --git a/.github/workflows/cmd-tests.yml b/.github/workflows/cmd-tests.yml index af73c6a5b2d32a19e7b64de4935f71988fbf8a1f..d2b46a98056a3a163d4095b4f025b45073af1b04 100644 --- a/.github/workflows/cmd-tests.yml +++ b/.github/workflows/cmd-tests.yml @@ -2,6 +2,7 @@ name: Command Bot Tests on: pull_request: + types: [opened, synchronize, reopened, ready_for_review] permissions: contents: read @@ -11,8 +12,11 @@ concurrency: cancel-in-progress: true jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml test-cmd-bot: runs-on: ubuntu-latest + needs: [isdraft] steps: - uses: actions/checkout@v4 - run: python3 .github/scripts/cmd/test_cmd.py diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b7c70c9e6d66f2dbef81c8f5aa2253b3b075820f..24fb284780be821bc4b947c9f62b6421ec205791 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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: @@ -13,7 +13,10 @@ concurrency: cancel-in-progress: true jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml preflight: + needs: isdraft uses: ./.github/workflows/reusable-preflight.yml test-doc: @@ -77,6 +80,7 @@ jobs: build-implementers-guide: runs-on: ubuntu-latest + needs: isdraft container: image: paritytech/mdbook-utils:e14aae4a-20221123 options: --user root diff --git a/.github/workflows/gitspiegel-trigger.yml b/.github/workflows/gitspiegel-trigger.yml index 01058ad74d0b71385a8096964ea6c779fc6f4869..954e4ad6e70dbfb36c2b8c9deb272c2246be3f66 100644 --- a/.github/workflows/gitspiegel-trigger.yml +++ b/.github/workflows/gitspiegel-trigger.yml @@ -28,8 +28,11 @@ on: permissions: {} jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml sync: runs-on: ubuntu-latest + needs: isdraft steps: - name: Do nothing run: echo "let's go" diff --git a/.github/workflows/publish-check-compile.yml b/.github/workflows/publish-check-compile.yml index f20909106a82098d79ab8e47b03bf5b4076b9380..66d619a2426d394edace31c10e8abf4cc5ee6423 100644 --- a/.github/workflows/publish-check-compile.yml +++ b/.github/workflows/publish-check-compile.yml @@ -13,7 +13,10 @@ concurrency: cancel-in-progress: true jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml preflight: + needs: isdraft uses: ./.github/workflows/reusable-preflight.yml check-publish-compile: diff --git a/.github/workflows/publish-check-crates.yml b/.github/workflows/publish-check-crates.yml index c1b13243ba193c7c141782dc263c577c5f0ec159..ac204b97dbdfe318dfeb021e6f3eb23c3c757b16 100644 --- a/.github/workflows/publish-check-crates.yml +++ b/.github/workflows/publish-check-crates.yml @@ -13,8 +13,11 @@ concurrency: cancel-in-progress: true jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml check-publish: runs-on: ubuntu-latest + needs: isdraft steps: - uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7 diff --git a/.github/workflows/reusable-isdraft.yml b/.github/workflows/reusable-isdraft.yml new file mode 100644 index 0000000000000000000000000000000000000000..a0ee5c064fbe21e920d6f634f72ffa8dafd30c5c --- /dev/null +++ b/.github/workflows/reusable-isdraft.yml @@ -0,0 +1,16 @@ +# The workflow is not part of reusable-preflight.yml to allow testing CI in draft. + +name: Preflight isdraft + +on: + workflow_call: + # Map the workflow outputs to job outputs + +jobs: + isdraft: + runs-on: ubuntu-latest + if: github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'A5-run-CI') + steps: + - name: echo test + shell: bash + run: echo "PR is not draft, starting CI" diff --git a/.github/workflows/tests-evm.yml b/.github/workflows/tests-evm.yml index 2c98fa39d23a3021d4f0039d76f70d7729be9dce..3bf3b6f275ff0d0f583c7b030ff15f17aa0f72b3 100644 --- a/.github/workflows/tests-evm.yml +++ b/.github/workflows/tests-evm.yml @@ -12,7 +12,10 @@ concurrency: cancel-in-progress: true jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml preflight: + needs: isdraft uses: ./.github/workflows/reusable-preflight.yml evm-test-suite: diff --git a/.github/workflows/tests-linux-stable.yml b/.github/workflows/tests-linux-stable.yml index 3f8dc4fe1240a078aef7ca498bc1e8667f13dda2..029d7bc7411326f90bbe9f2cf1f941a9cfc55136 100644 --- a/.github/workflows/tests-linux-stable.yml +++ b/.github/workflows/tests-linux-stable.yml @@ -13,7 +13,10 @@ concurrency: cancel-in-progress: true jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml preflight: + needs: isdraft uses: ./.github/workflows/reusable-preflight.yml test-linux-stable-int: diff --git a/.github/workflows/tests-misc.yml b/.github/workflows/tests-misc.yml index decd88f2e84cfb5cf7519046f0018e6119c03315..77e39a99f9ed9f0241f95b1cc27ec523ecd2079b 100644 --- a/.github/workflows/tests-misc.yml +++ b/.github/workflows/tests-misc.yml @@ -14,7 +14,10 @@ concurrency: # Jobs in this workflow depend on each other, only for limiting peak amount of spawned workers jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml preflight: + needs: isdraft uses: ./.github/workflows/reusable-preflight.yml # more information about this job can be found here: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ba0574b51e686fa9c3ffa4e3b35e986c7f373e55..a178ea02f0c5f142376db1be12f747a027ec0647 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,7 +12,10 @@ concurrency: cancel-in-progress: true jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml preflight: + needs: isdraft uses: ./.github/workflows/reusable-preflight.yml # This job runs all benchmarks defined in the `/bin/node/runtime` once to check that there are no errors. diff --git a/.github/workflows/zombienet_cumulus.yml b/.github/workflows/zombienet_cumulus.yml index c2231060c9aa1fe336060ace9768c50bd9d3b0fd..492c63b302a10ebf2840041e40dbfc8099db3a81 100644 --- a/.github/workflows/zombienet_cumulus.yml +++ b/.github/workflows/zombienet_cumulus.yml @@ -19,7 +19,10 @@ env: # only run if we have changes in [subtrate, cumulus, polkadot] directories or this workflow. jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml preflight: + needs: isdraft uses: ./.github/workflows/zombienet-reusable-preflight.yml zombienet-cumulus-0001-sync_blocks_from_tip_without_connected_collator: @@ -158,7 +161,6 @@ jobs: path: | /tmp/zombie*/logs/* - zombienet-cumulus-0005-migrate_solo_to_para: needs: [preflight] if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }} diff --git a/.github/workflows/zombienet_substrate.yml b/.github/workflows/zombienet_substrate.yml index 358438caa8afe7ddb65dff67cfc05c869c9742a1..7ddc2e613b238e83bdd2d701460bfdb22bc66039 100644 --- a/.github/workflows/zombienet_substrate.yml +++ b/.github/workflows/zombienet_substrate.yml @@ -24,7 +24,10 @@ env: DB_BLOCK_HEIGHT: 56687 jobs: + isdraft: + uses: ./.github/workflows/reusable-isdraft.yml preflight: + needs: isdraft uses: ./.github/workflows/zombienet-reusable-preflight.yml zombienet-substrate-0000-block-building: