Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): Prevent workflows from automatically running on forks #34408

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/tests_bidi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:
jobs:
test_bidi:
name: BiDi
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
runs-on: ubuntu-24.04
permissions:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests_components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ env:
jobs:
test_components:
name: ${{ matrix.os }} - Node.js ${{ matrix.node-version }}
if: github.repository == 'microsoft/playwright'
strategy:
fail-fast: false
matrix:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/tests_others.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ env:
jobs:
test_stress:
name: Stress - ${{ matrix.os }}
if: github.repository == 'microsoft/playwright'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -57,6 +58,7 @@ jobs:

test_webview2:
name: WebView2
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
runs-on: windows-2022
permissions:
Expand Down Expand Up @@ -87,6 +89,7 @@ jobs:

test_clock_frozen_time_linux:
name: time library - ${{ matrix.clock }}
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
permissions:
id-token: write # This is required for OIDC login (azure/login) to succeed
Expand All @@ -112,6 +115,7 @@ jobs:

test_clock_frozen_time_test_runner:
name: time test runner - ${{ matrix.clock }}
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
runs-on: ubuntu-22.04
permissions:
Expand All @@ -136,6 +140,7 @@ jobs:

test_electron:
name: Electron - ${{ matrix.os }}
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
strategy:
fail-fast: false
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/tests_primary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ env:
jobs:
test_linux:
name: ${{ matrix.os }} (${{ matrix.browser }} - Node.js ${{ matrix.node-version }})
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -59,6 +60,7 @@ jobs:

test_linux_chromium_tot:
name: ${{ matrix.os }} (chromium tip-of-tree)
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
strategy:
fail-fast: false
Expand All @@ -83,6 +85,7 @@ jobs:

test_test_runner:
name: Test Runner
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -127,6 +130,7 @@ jobs:

test_web_components:
name: Web Components
if: github.repository == 'microsoft/playwright'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -162,6 +166,7 @@ jobs:

test_vscode_extension:
name: VSCode Extension
if: github.repository == 'microsoft/playwright'
runs-on: ubuntu-latest
env:
PWTEST_BOT_NAME: "vscode-extension"
Expand Down Expand Up @@ -198,6 +203,7 @@ jobs:

test_package_installations:
name: "Installation Test ${{ matrix.os }}"
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
strategy:
fail-fast: false
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/tests_secondary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ permissions:
jobs:
test_linux:
name: ${{ matrix.os }} (${{ matrix.browser }})
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
strategy:
fail-fast: false
Expand All @@ -46,6 +47,7 @@ jobs:

test_mac:
name: ${{ matrix.os }} (${{ matrix.browser }})
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -73,6 +75,7 @@ jobs:

test_win:
name: "Windows"
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
strategy:
fail-fast: false
Expand All @@ -92,6 +95,7 @@ jobs:

test-package-installations-other-node-versions:
name: "Installation Test ${{ matrix.os }} (${{ matrix.node_version }})"
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -125,6 +129,7 @@ jobs:

headed_tests:
name: "headed ${{ matrix.browser }} (${{ matrix.os }})"
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
strategy:
fail-fast: false
Expand All @@ -151,6 +156,7 @@ jobs:

transport_linux:
name: "Transport"
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
strategy:
fail-fast: false
Expand All @@ -172,6 +178,7 @@ jobs:

tracing_linux:
name: Tracing ${{ matrix.browser }} ${{ matrix.channel }}
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -199,6 +206,7 @@ jobs:

test_chromium_channels:
name: Test ${{ matrix.channel }} on ${{ matrix.runs-on }}
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
runs-on: ${{ matrix.runs-on }}
strategy:
Expand All @@ -221,6 +229,7 @@ jobs:

chromium_tot:
name: Chromium tip-of-tree ${{ matrix.os }}${{ matrix.headed }}
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -243,6 +252,7 @@ jobs:

chromium_tot_headless_shell:
name: Chromium tip-of-tree headless-shell-${{ matrix.os }}
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -264,6 +274,7 @@ jobs:

firefox_beta:
name: Firefox Beta ${{ matrix.os }}
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -285,6 +296,7 @@ jobs:

build-playwright-driver:
name: "build-playwright-driver"
if: github.repository == 'microsoft/playwright'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
Expand All @@ -298,6 +310,7 @@ jobs:

test_channel_chromium:
name: Test channel=chromium
if: github.repository == 'microsoft/playwright'
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
strategy:
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests_service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:
jobs:
test:
name: "Service"
if: github.repository == 'microsoft/playwright'
strategy:
fail-fast: false
matrix:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests_video.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:
jobs:
video_linux:
name: "Video Linux"
if: github.repository == 'microsoft/playwright'
environment: allow-uploading-flakiness-results
strategy:
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/trigger_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
jobs:
trigger:
name: "trigger"
if: github.repository == 'microsoft/playwright'
runs-on: ubuntu-24.04
steps:
- run: |
Expand Down
Loading