From 642e19159a622fbdd301adc5efccdd4fe233d732 Mon Sep 17 00:00:00 2001 From: KasukabeDefenceForce Date: Thu, 1 Aug 2024 12:56:59 +0530 Subject: [PATCH] Donot run docs, benchmarks and stardis tests on draft PRs. (#2761) * Add ready to review to run tests * Add if condition to check PR status * Running stardis tests only on push to master * Removing osx-64 from workflows --- .github/workflows/benchmarks.yml | 2 ++ .github/workflows/build-docs.yml | 2 ++ .github/workflows/stardis-tests.yml | 14 ++++++++------ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 9ed9b5581e4..2ed44515e7b 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -14,6 +14,7 @@ on: - reopened - synchronize - labeled # benchmarks label required + - ready_for_review workflow_dispatch: env: @@ -31,6 +32,7 @@ jobs: build: if: github.repository_owner == 'tardis-sn' && (github.event_name == 'push' || + (!github.event.pull_request.draft) || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'benchmarks'))) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index bb17c9581f0..254c19ffbdd 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -18,6 +18,7 @@ on: - reopened - synchronize - labeled # requires the `build-docs` label + - ready_for_review workflow_dispatch: # manual trigger @@ -37,6 +38,7 @@ defaults: jobs: check-for-changes: runs-on: ubuntu-latest + if: ${{ !github.event.pull_request.draft }} outputs: trigger-check-outcome: ${{ steps.trigger_check.outcome }} docs-check-outcome: ${{ steps.docs_check.outcome }} diff --git a/.github/workflows/stardis-tests.yml b/.github/workflows/stardis-tests.yml index fad5fbaa7d9..a8e09d8a1db 100644 --- a/.github/workflows/stardis-tests.yml +++ b/.github/workflows/stardis-tests.yml @@ -3,12 +3,17 @@ name: stardis-tests on: push: branches: - - '*' + - master pull_request: branches: - '*' + types: + - opened + - reopened + - synchronize + - ready_for_review workflow_dispatch: defaults: @@ -22,18 +27,15 @@ jobs: build: strategy: matrix: - label: [osx-64, linux-64] + label: [linux-64] include: - os: ubuntu-latest label: linux-64 prefix: /usr/share/miniconda3/envs/stardis - - os: macos-latest - label: osx-64 - prefix: /Users/runner/miniconda3/envs/stardis - name: ${{ matrix.label }} runs-on: ${{ matrix.os }} + if: ${{ !github.event.pull_request.draft }} steps: - uses: actions/checkout@v4 with: