You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/12/02 14:15:00 UTC
[GitHub] [beam] damccorm commented on a diff in pull request #24448: Reduce version matrix of build wheel on pull request event
damccorm commented on code in PR #24448:
URL: https://github.com/apache/beam/pull/24448#discussion_r1038184393
##########
.github/workflows/build_wheels.yml:
##########
@@ -60,6 +65,18 @@ jobs:
GCP_PROJECT_ID: "not-needed-here"
GCP_REGION: "not-needed-here"
GCP_TESTING_BUCKET: "not-needed-here"
+ - name: Set Python Versions for different environments
+ id: set-py-versions
+ run: |
+ set -xeu
+ if [ $EVENT_NAME == "pull_request" ]; then
+ # run highest supported version on pull request
+ echo "py-versions-test=${PY_VERSIONS_FULL##* }" >> $GITHUB_OUTPUT
+ else
+ # run full version for push and cron job, and on x64 Linux for pull request event
+ echo "py-versions-test=$PY_VERSIONS_FULL" >> $GITHUB_OUTPUT
+ fi
+ echo "py-versions-full=$PY_VERSIONS_FULL" >> $GITHUB_OUTPUT
Review Comment:
```suggestion
- name: Set Python Versions for different environments
id: set-py-versions
run: |
set -xeu
if [ $EVENT_NAME == "pull_request" ]; then
# run highest supported version on pull request.
echo "py-versions-test=${PY_VERSIONS_FULL##* }" >> $GITHUB_OUTPUT
else
# run full version for push and cron jobs.
echo "py-versions-test=$PY_VERSIONS_FULL" >> $GITHUB_OUTPUT
fi
# Output full set of versions so that we can test all languages on pull requests for certain platforms.
echo "py-versions-full=$PY_VERSIONS_FULL" >> $GITHUB_OUTPUT
```
Minor: right now, these comments are leaking implementation details across our interface; ideally we should be able to change the consumer of this job (build-source) to special case mac **and** linux (or any other combo) without this comment becoming outdated. Another example of this would be adding another job that uses these output variables.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org