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 third party scheduled tests running on forks #525

Merged
merged 2 commits into from
Dec 22, 2024
Merged
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
88 changes: 18 additions & 70 deletions .github/workflows/third_party.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,20 @@ concurrency:
cancel-in-progress: true

jobs:
skip-schedule-on-fork:
name: Check for schedule trigger on fork
runs-on: ubuntu-latest
# if 'schedule' was the trigger,
# don't run it on contributors' forks
if: >-
github.repository == 'python/typing_extensions'
|| github.event_name != 'schedule'
steps:
- run: true

pydantic:
name: pydantic tests
if: >-
# if 'schedule' was the trigger,
# don't run it on contributors' forks
${{
github.event_name != 'schedule'
|| (
github.repository == 'python/typing_extensions'
&& github.event_name == 'schedule'
)
}}
needs: skip-schedule-on-fork
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -72,16 +74,7 @@ jobs:

typing_inspect:
name: typing_inspect tests
if: >-
# if 'schedule' was the trigger,
# don't run it on contributors' forks
${{
github.event_name != 'schedule'
|| (
github.repository == 'python/typing_extensions'
&& github.event_name == 'schedule'
)
}}
needs: skip-schedule-on-fork
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -117,16 +110,7 @@ jobs:

pyanalyze:
name: pyanalyze tests
if: >-
# if 'schedule' was the trigger,
# don't run it on contributors' forks
${{
github.event_name != 'schedule'
|| (
github.repository == 'python/typing_extensions'
&& github.event_name == 'schedule'
)
}}
needs: skip-schedule-on-fork
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -163,16 +147,7 @@ jobs:

typeguard:
name: typeguard tests
if: >-
# if 'schedule' was the trigger,
# don't run it on contributors' forks
${{
github.event_name != 'schedule'
|| (
github.repository == 'python/typing_extensions'
&& github.event_name == 'schedule'
)
}}
needs: skip-schedule-on-fork
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -210,16 +185,7 @@ jobs:

typed-argument-parser:
name: typed-argument-parser tests
if: >-
# if 'schedule' was the trigger,
# don't run it on contributors' forks
${{
github.event_name != 'schedule'
|| (
github.repository == 'python/typing_extensions'
&& github.event_name == 'schedule'
)
}}
needs: skip-schedule-on-fork
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -262,16 +228,7 @@ jobs:

mypy:
name: stubtest & mypyc tests
if: >-
# if 'schedule' was the trigger,
# don't run it on contributors' forks
${{
github.event_name != 'schedule'
|| (
github.repository == 'python/typing_extensions'
&& github.event_name == 'schedule'
)
}}
needs: skip-schedule-on-fork
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -309,16 +266,7 @@ jobs:

cattrs:
name: cattrs tests
if: >-
# if 'schedule' was the trigger,
# don't run it on contributors' forks
${{
github.event_name != 'schedule'
|| (
github.repository == 'python/typing_extensions'
&& github.event_name == 'schedule'
)
}}
needs: skip-schedule-on-fork
strategy:
fail-fast: false
matrix:
Expand Down
Loading