Skip to content

Commit 8beb9fa

Browse files
authored
Prevent double-trigger in CI
1 parent f668288 commit 8beb9fa

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on: [push, pull_request, workflow_dispatch]
66

77
jobs:
88
generate_ctypes:
9+
# Prevent double trigger on my PR: so push for me and PR for forks
10+
if: ${{(github.event_name == 'push') || (github.event.pull_request.head.repo.fork)}}
911
runs-on: windows-latest
1012
timeout-minutes: 5
1113

@@ -19,7 +21,8 @@ jobs:
1921
- name: Check generated code can execute
2022
run: py -c "import windows.generated_def"
2123
tests:
22-
# Not a real dependency : but starting tests when ctypes generation is broken is not useful
24+
# Prevent double trigger on my PR: so push for me and PR for forks
25+
if: ${{(github.event_name == 'push') || (github.event.pull_request.head.repo.fork)}}
2326
strategy:
2427
fail-fast: false
2528
matrix:
@@ -32,7 +35,7 @@ jobs:
3235
python-architecture: x86
3336
- python-bitness-to-test: 64
3437
python-architecture: x64
35-
38+
# Not a real dependency : but starting tests when ctypes generation is broken is not useful
3639
needs: generate_ctypes
3740
timeout-minutes: 15
3841
runs-on: ${{ matrix.runs-on }}
@@ -90,4 +93,4 @@ jobs:
9093
check_name: PyTest Results for ${{ matrix.python-version}}-${{ matrix.python-bitness-to-test}}
9194
secondary_rate_limit_wait_seconds: 90
9295
seconds_between_github_writes: 10
93-
seconds_between_github_reads: 1
96+
seconds_between_github_reads: 1

0 commit comments

Comments
 (0)