Skip to content

Commit 9d4bc89

Browse files
Modify time consuming PR workflows to not trigger for drafts
1 parent 92e9b0f commit 9d4bc89

10 files changed

+44
-0
lines changed

.github/workflows/android-app.yml

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name: Android - Build and test
33
on:
44
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
56
paths:
67
- '**'
78
- '!.github/workflows/**'
@@ -49,6 +50,7 @@ on:
4950
jobs:
5051
prepare:
5152
name: Prepare
53+
if: github.event.pull_request.draft == false
5254
runs-on: ubuntu-latest
5355
steps:
5456
- name: Checkout repository
@@ -68,6 +70,7 @@ jobs:
6870

6971
generate-debug-keystore:
7072
name: Generate debug keystore
73+
if: github.event.pull_request.draft == false
7174
needs: prepare
7275
runs-on: ubuntu-latest
7376
steps:
@@ -93,6 +96,7 @@ jobs:
9396

9497
generate-relay-list:
9598
name: Generate relay list
99+
if: github.event.pull_request.draft == false
96100
needs: prepare
97101
runs-on: ubuntu-latest
98102
container:
@@ -137,6 +141,7 @@ jobs:
137141

138142
build-native:
139143
name: Build native
144+
if: github.event.pull_request.draft == false
140145
needs: prepare
141146
runs-on: ubuntu-latest
142147
container:
@@ -209,6 +214,7 @@ jobs:
209214

210215
run-lint-and-tests:
211216
name: Run lint and test tasks
217+
if: github.event.pull_request.draft == false
212218
needs: [prepare]
213219
runs-on: ubuntu-latest
214220
container:
@@ -248,6 +254,7 @@ jobs:
248254

249255
build-app:
250256
name: Build app
257+
if: github.event.pull_request.draft == false
251258
needs: [prepare, generate-debug-keystore]
252259
runs-on: ubuntu-latest
253260
container:
@@ -340,6 +347,7 @@ jobs:
340347

341348
build-instrumented-tests:
342349
name: Build instrumented test packages
350+
if: github.event.pull_request.draft == false
343351
needs: [prepare, generate-debug-keystore]
344352
runs-on: ubuntu-latest
345353
container:
@@ -393,6 +401,7 @@ jobs:
393401

394402
instrumented-tests:
395403
name: Run instrumented tests
404+
if: github.event.pull_request.draft == false
396405
runs-on: [self-hosted, android-device]
397406
timeout-minutes: 30
398407
needs: [build-app, build-instrumented-tests]
@@ -457,6 +466,7 @@ jobs:
457466

458467
instrumented-e2e-tests:
459468
name: Run instrumented e2e tests
469+
if: github.event.pull_request.draft == false
460470
runs-on: [self-hosted, android-device]
461471
if: github.event_name == 'schedule' || github.event.inputs.run_e2e_tests == 'true'
462472
timeout-minutes: 30

.github/workflows/android-audit.yml

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name: Android - Audit dependencies
33
on:
44
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
56
paths:
67
- .github/workflows/android-audit.yml
78
- android/gradle/verification-metadata.xml
@@ -23,6 +24,7 @@ on:
2324
jobs:
2425
prepare:
2526
name: Prepare
27+
if: github.event.pull_request.draft == false
2628
runs-on: ubuntu-latest
2729
steps:
2830
- name: Checkout repository
@@ -42,6 +44,7 @@ jobs:
4244
container_image: ${{ env.inner_container_image }}
4345

4446
owasp-dependency-check:
47+
if: github.event.pull_request.draft == false
4548
needs: prepare
4649
runs-on: ubuntu-latest
4750
container:

.github/workflows/android-kotlin-format-check.yml

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name: Android - Check kotlin formatting
33
on:
44
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
56
paths: [.github/workflows/android-kotlin-format-check.yml, android/**/*.kt]
67
workflow_dispatch:
78
inputs:
@@ -12,6 +13,7 @@ on:
1213
jobs:
1314
prepare:
1415
name: Prepare
16+
if: github.event.pull_request.draft == false
1517
runs-on: ubuntu-latest
1618
steps:
1719
- name: Checkout repository
@@ -31,6 +33,7 @@ jobs:
3133
container_image: ${{ env.inner_container_image }}
3234

3335
check-formatting:
36+
if: github.event.pull_request.draft == false
3437
needs: prepare
3538
runs-on: ubuntu-latest
3639
container:

.github/workflows/clippy.yml

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name: Rust - Run Clippy to check lints
33
on:
44
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
56
paths:
67
- .github/workflows/clippy.yml
78
- clippy.toml
@@ -10,6 +11,7 @@ on:
1011
jobs:
1112
prepare-android:
1213
name: Prepare Android container
14+
if: github.event.pull_request.draft == false
1315
runs-on: ubuntu-latest
1416
steps:
1517
- name: Checkout repository
@@ -30,6 +32,7 @@ jobs:
3032

3133
clippy-check-desktop:
3234
name: Clippy linting, desktop
35+
if: github.event.pull_request.draft == false
3336
strategy:
3437
matrix:
3538
os: [ubuntu-latest, windows-latest, macos-latest]
@@ -69,6 +72,7 @@ jobs:
6972
7073
clippy-check-android:
7174
name: Clippy linting, Android
75+
if: github.event.pull_request.draft == false
7276
needs: prepare-android
7377
runs-on: ubuntu-latest
7478
container:

.github/workflows/daemon.yml

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name: Daemon+CLI - Build and test
33
on:
44
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
56
paths:
67
- '**'
78
- '!**/**.md'
@@ -31,6 +32,7 @@ on:
3132
required: false
3233
jobs:
3334
prepare-linux:
35+
if: github.event.pull_request.draft == false
3436
runs-on: ubuntu-latest
3537
steps:
3638
- name: Checkout repository
@@ -50,6 +52,7 @@ jobs:
5052
container_image: ${{ env.inner_container_image }}
5153

5254
build-linux:
55+
if: github.event.pull_request.draft == false
5356
needs: prepare-linux
5457
runs-on: ubuntu-latest
5558
container:
@@ -81,6 +84,7 @@ jobs:
8184
run: ./ci/check-rust.sh
8285

8386
build-macos:
87+
if: github.event.pull_request.draft == false
8488
runs-on: macos-latest
8589
steps:
8690
- name: Checkout repository
@@ -106,6 +110,7 @@ jobs:
106110
run: ./ci/check-rust.sh
107111

108112
build-windows:
113+
if: github.event.pull_request.draft == false
109114
runs-on: windows-latest
110115
steps:
111116
- name: Checkout repository

.github/workflows/frontend.yml

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name: Desktop frontend
33
on:
44
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
56
paths:
67
- .github/workflows/frontend.yml
78
- gui/**
@@ -10,6 +11,7 @@ on:
1011

1112
jobs:
1213
check-frontend:
14+
if: github.event.pull_request.draft == false
1315
strategy:
1416
matrix:
1517
os: [ubuntu-latest, windows-latest]

.github/workflows/ios.yml

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name: iOS app
33
on:
44
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
56
paths:
67
- .github/workflows/ios.yml
78
- ios/build-rust-library.sh
@@ -12,6 +13,7 @@ on:
1213
jobs:
1314
check-formatting:
1415
name: Check formatting
16+
if: github.event.pull_request.draft == false
1517
runs-on: macos-13
1618
steps:
1719
- name: Install SwiftFormat
@@ -30,6 +32,7 @@ jobs:
3032

3133
swiftlint:
3234
name: Run swiftlint
35+
if: github.event.pull_request.draft == false
3336
runs-on: macos-13
3437
steps:
3538
- name: Checkout repository
@@ -44,6 +47,7 @@ jobs:
4447

4548
test:
4649
name: Unit tests
50+
if: github.event.pull_request.draft == false
4751
runs-on: macos-13-xlarge
4852
env:
4953
SOURCE_PACKAGES_PATH: .spm

.github/workflows/rust-unused-dependencies.yml

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name: Rust - Unused dependencies
33
on:
44
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
56
paths:
67
- .github/workflows/rust-unused-dependencies.yml
78
- '**/*.rs'
@@ -13,6 +14,7 @@ env:
1314
RUST_NIGHTLY_TOOLCHAIN: nightly-2024-02-06
1415
jobs:
1516
prepare-containers:
17+
if: github.event.pull_request.draft == false
1618
runs-on: ubuntu-latest
1719
steps:
1820
- uses: actions/checkout@v3
@@ -27,6 +29,7 @@ jobs:
2729
container_image_android: ${{ env.inner_container_image_android }}
2830

2931
cargo-udeps-linux:
32+
if: github.event.pull_request.draft == false
3033
needs: prepare-containers
3134
runs-on: ubuntu-latest
3235
container:
@@ -58,6 +61,7 @@ jobs:
5861
run: source env.sh && cargo udeps --workspace
5962

6063
cargo-udeps-android:
64+
if: github.event.pull_request.draft == false
6165
needs: prepare-containers
6266
runs-on: ubuntu-latest
6367
container:
@@ -85,6 +89,7 @@ jobs:
8589
run: cargo udeps --target aarch64-linux-android --package mullvad-jni
8690

8791
cargo-udeps:
92+
if: github.event.pull_request.draft == false
8893
strategy:
8994
matrix:
9095
os: [macos-latest, windows-latest]

.github/workflows/testframework-clippy.yml

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
name: DES Testframework - Clippy
44
on:
55
pull_request:
6+
types: [opened, synchronize, reopened, ready_for_review]
67
paths:
78
- 'test/**/*.rs'
89
- .github/workflows/clippy-test.yml
@@ -11,6 +12,7 @@ on:
1112
jobs:
1213
clippy-check-test:
1314
name: Clippy linting of test workspace
15+
if: github.event.pull_request.draft == false
1416
strategy:
1517
fail-fast: false
1618
matrix:
@@ -48,6 +50,7 @@ jobs:
4850
4951
clippy-check-test-windows:
5052
name: Clippy linting of test workspace (Windows)
53+
if: github.event.pull_request.draft == false
5154
runs-on: windows-latest
5255
steps:
5356
- name: Checkout repository

.github/workflows/testframework.yml

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
name: DES Testframework - Build
44
on:
55
pull_request:
6+
types: [opened, synchronize, reopened, ready_for_review]
67
paths:
78
- '**'
89
- '!**/**.md'
@@ -26,6 +27,7 @@ on:
2627
workflow_dispatch:
2728
jobs:
2829
prepare-build-test-framework-linux:
30+
if: github.event.pull_request.draft == false
2931
runs-on: ubuntu-latest
3032
steps:
3133
- name: Checkout repository
@@ -46,6 +48,7 @@ jobs:
4648

4749
# Build the test runner + test manager at once.
4850
build-test-framework-linux:
51+
if: github.event.pull_request.draft == false
4952
needs: prepare-build-test-framework-linux
5053
runs-on: ubuntu-latest
5154
container:
@@ -69,6 +72,7 @@ jobs:
6972

7073
# Build the test runner + test manager at once.
7174
build-test-framework-macos:
75+
if: github.event.pull_request.draft == false
7276
runs-on: macos-latest
7377
steps:
7478
- name: Checkout repository
@@ -91,6 +95,7 @@ jobs:
9195

9296
# Build only the test-runner binary on Windows. Windows is not a supported host for test-manager.
9397
build-test-runner-windows:
98+
if: github.event.pull_request.draft == false
9499
# Cross-compile the test runner for Windows from Linux.
95100
needs: prepare-build-test-framework-linux
96101
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)