From 30adf842eba0f2e39a9f8a7040d02f2f92ab012a Mon Sep 17 00:00:00 2001 From: vorotamoroz Date: Mon, 19 Oct 2026 10:16:42 +0000 Subject: [PATCH] ci: skip test jobs for draft pull requests --- .github/workflows/cli-deno-tests.yml | 3 +++ .github/workflows/cli-docker-validation.yml | 5 ++++- .github/workflows/cli-p2p-tests.yml | 2 ++ .github/workflows/unit-ci.yml | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cli-deno-tests.yml b/.github/workflows/cli-deno-tests.yml index 76abc996..66f13e77 100644 --- a/.github/workflows/cli-deno-tests.yml +++ b/.github/workflows/cli-deno-tests.yml @@ -22,6 +22,7 @@ on: - 'package.json' - 'package-lock.json' pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths: - '.github/workflows/cli-deno-tests.yml' - 'src/apps/cli/**' @@ -66,6 +67,7 @@ concurrency: jobs: prepare: + if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }} runs-on: ubuntu-latest timeout-minutes: 15 env: @@ -125,6 +127,7 @@ jobs: retention-days: 1 test: + if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }} needs: prepare runs-on: ubuntu-latest timeout-minutes: 60 diff --git a/.github/workflows/cli-docker-validation.yml b/.github/workflows/cli-docker-validation.yml index a993e9ed..5c76d551 100644 --- a/.github/workflows/cli-docker-validation.yml +++ b/.github/workflows/cli-docker-validation.yml @@ -2,6 +2,7 @@ name: CLI Docker validation on: pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths: - '.github/workflows/cli-docker.yml' - '.github/workflows/cli-docker-validation.yml' @@ -40,6 +41,7 @@ concurrency: jobs: bundle: + if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }} name: Build shared Docker CLI bundle runs-on: ubuntu-24.04 timeout-minutes: 15 @@ -72,6 +74,7 @@ jobs: retention-days: 1 validate: + if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }} name: Docker E2E (${{ matrix.arch }}) needs: bundle runs-on: ${{ matrix.runner }} @@ -171,7 +174,7 @@ jobs: summary: name: Collect both Docker E2E results needs: validate - if: always() + if: ${{ always() && (github.event_name != 'pull_request' || !github.event.pull_request.draft) }} runs-on: ubuntu-24.04 timeout-minutes: 5 outputs: diff --git a/.github/workflows/cli-p2p-tests.yml b/.github/workflows/cli-p2p-tests.yml index 17ffa039..478afad4 100644 --- a/.github/workflows/cli-p2p-tests.yml +++ b/.github/workflows/cli-p2p-tests.yml @@ -24,6 +24,7 @@ on: - '.dockerignore' - 'test/bench-network/**' pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths: - '.github/workflows/cli-p2p-tests.yml' - 'src/apps/cli/**' @@ -53,6 +54,7 @@ concurrency: jobs: compose-p2p-e2e: + if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }} runs-on: ubuntu-latest timeout-minutes: 45 steps: diff --git a/.github/workflows/unit-ci.yml b/.github/workflows/unit-ci.yml index a3b94cfe..9df08f2d 100644 --- a/.github/workflows/unit-ci.yml +++ b/.github/workflows/unit-ci.yml @@ -44,6 +44,7 @@ on: - '.github/workflows/cli-docker.yml' - '.github/workflows/unit-ci.yml' pull_request: + types: [opened, synchronize, reopened, ready_for_review] paths: - 'manifest.json' - 'updates.md' @@ -86,6 +87,7 @@ permissions: jobs: setup-tools: + if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }} name: Self-hosted setup tools runs-on: ubuntu-latest timeout-minutes: 15 @@ -134,6 +136,7 @@ jobs: run: npm run test:docker-couchdb:stop || true unit-test: + if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }} name: Unit Tests runs-on: ubuntu-latest timeout-minutes: 30 @@ -173,6 +176,7 @@ jobs: path: coverage/** integration-test: + if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }} name: Integration Tests runs-on: ubuntu-latest timeout-minutes: 30