From b8c9f5d989a80c3c8528cfa450e7d3b1b2e59ebd Mon Sep 17 00:00:00 2001 From: Joao-Dionisio Date: Tue, 22 Apr 2025 18:26:20 +0100 Subject: [PATCH 1/4] Don't run tests on draft PRs --- .github/workflows/coverage.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index eee0a9404..d63bdec20 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -7,12 +7,14 @@ on: branches: - 'master' pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - 'master' jobs: test-coverage: + if: github.event.pull_request.draft == false runs-on: ubuntu-22.04 strategy: fail-fast: true From 0f81f0c186963283d8692b68ffcd8b21f3e02755 Mon Sep 17 00:00:00 2001 From: Joao-Dionisio Date: Tue, 22 Apr 2025 18:34:09 +0100 Subject: [PATCH 2/4] Also skip when creating draft pr --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index d63bdec20..624c5feb6 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -14,7 +14,7 @@ on: jobs: test-coverage: - if: github.event.pull_request.draft == false + if: github.event_name != 'pull_request' || github.event.pull_request.draft == false runs-on: ubuntu-22.04 strategy: fail-fast: true From 8fe0c7e5f1da2b1ae1a6779b218b503872e56580 Mon Sep 17 00:00:00 2001 From: Joao-Dionisio Date: Tue, 22 Apr 2025 18:40:37 +0100 Subject: [PATCH 3/4] Update CHANGELOG and check if tests run while closed --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18718ae76..0dadd7965 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixed - Fixed bug when accessing matrix variable attributes ### Changed +- Stopped tests from running in draft PRs ### Removed ## 5.4.1 - 2024.02.24 From 31cb077769df04c602bbde0105988df7544c3cce Mon Sep 17 00:00:00 2001 From: Joao-Dionisio Date: Tue, 22 Apr 2025 18:44:29 +0100 Subject: [PATCH 4/4] Final commit? --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 624c5feb6..8ead035d5 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -14,7 +14,7 @@ on: jobs: test-coverage: - if: github.event_name != 'pull_request' || github.event.pull_request.draft == false + if: (github.event_name != 'pull_request') || (github.event.pull_request.draft == false) runs-on: ubuntu-22.04 strategy: fail-fast: true