-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Skip benchmarks in ci when running in fork repositories #11737
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
Open
Cycloctane
wants to merge
14
commits into
aio-libs:master
Choose a base branch
from
Cycloctane:skip-workflows-in-forks
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+42
−8
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
472340d
skip codecov upload and benchmarks in forks
Cycloctane 774458a
add changelog
Cycloctane 5b5050a
remove condition in test workflow
Cycloctane 7ac3a86
use repository id instead of owner name
Cycloctane e5b7ee8
update changelog
Cycloctane 11d1bb0
update changelog
Cycloctane 1158883
Update CHANGES/11737.contrib.rst
Cycloctane ee0cba9
update ci-cd
Cycloctane f6cda6e
fix syntax
Cycloctane 91b636d
Annotate transitive job deps with context comments
webknjaz e00c778
Add an explicit ternary for the `release-requested` value
webknjaz c5bac46
Remove codspeed token from CI/CD benchmarks step
Cycloctane 33dfdd4
Update pypy version
Cycloctane 947f356
Always skip the dummy step in pre-setup
webknjaz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,10 +23,33 @@ env: | |
| FORCE_COLOR: 1 # Request colored output from CLI tools supporting it | ||
| MYPY_FORCE_COLOR: 1 | ||
| PY_COLORS: 1 | ||
| UPSTREAM_REPOSITORY_ID: >- | ||
| 13258039 | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
|
|
||
| pre-setup: | ||
| name: Pre-Setup global build settings | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| upstream-repository-id: ${{ env.UPSTREAM_REPOSITORY_ID }} | ||
| release-requested: >- | ||
| ${{ | ||
| ( | ||
| github.event_name == 'push' | ||
| && github.ref_type == 'tag' | ||
| ) | ||
| && true | ||
| || false | ||
| }} | ||
| steps: | ||
| - name: Dummy | ||
| if: false | ||
| run: | | ||
| echo "Pre-setup step" | ||
|
|
||
| lint: | ||
| permissions: | ||
| contents: read # to fetch code (actions/checkout) | ||
|
|
@@ -148,7 +171,7 @@ jobs: | |
| - os: windows | ||
| no-extensions: 'Y' | ||
| include: | ||
| - pyver: pypy-3.10 | ||
| - pyver: pypy-3.11 | ||
| no-extensions: 'Y' | ||
| os: ubuntu | ||
| experimental: false | ||
|
|
@@ -259,8 +282,11 @@ jobs: | |
|
|
||
| benchmark: | ||
| name: Benchmark | ||
| needs: gen_llhttp | ||
|
|
||
| needs: | ||
| - gen_llhttp | ||
| - pre-setup # transitive, for accessing settings | ||
| if: >- | ||
| needs.pre-setup.outputs.upstream-repository-id == github.repository_id | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 12 | ||
| steps: | ||
|
|
@@ -295,7 +321,6 @@ jobs: | |
| uses: CodSpeedHQ/action@v4 | ||
| with: | ||
| mode: instrumentation | ||
| token: ${{ secrets.CODSPEED_TOKEN }} | ||
| run: python -Im pytest --no-cov --numprocesses=0 -vvvvv --codspeed | ||
|
|
||
|
|
||
|
|
@@ -317,9 +342,10 @@ jobs: | |
| pre-deploy: | ||
| name: Pre-Deploy | ||
| runs-on: ubuntu-latest | ||
| needs: check | ||
| # Run only on pushing a tag | ||
| if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
| needs: | ||
| - check | ||
| - pre-setup # transitive, for accessing settings | ||
| if: fromJSON(needs.pre-setup.outputs.release-requested) | ||
| steps: | ||
| - name: Dummy | ||
| run: | | ||
|
|
@@ -465,8 +491,13 @@ jobs: | |
|
|
||
| deploy: | ||
| name: Deploy | ||
| needs: [build-tarball, build-wheels] | ||
| needs: | ||
| - build-tarball | ||
| - build-wheels | ||
| - pre-setup # transitive, for accessing settings | ||
| runs-on: ubuntu-latest | ||
| if: >- | ||
| needs.pre-setup.outputs.upstream-repository-id == github.repository_id | ||
|
Comment on lines
+494
to
+500
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you move this to a separate PR? |
||
|
|
||
| permissions: | ||
| contents: write # IMPORTANT: mandatory for making GitHub Releases | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| The benchmark CI job now runs only in the upstream repository -- by :user:`Cycloctane`. | ||
|
|
||
| It used to always fail in forks, which this change fixed. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.