-
Notifications
You must be signed in to change notification settings - Fork 294
Add GitHub Actions workflow for tox #527
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
Add GitHub Actions workflow for tox #527
Conversation
With credit to @graingert via twisted/ldaptor#207
…builds via GitHub Actions; the 'push' event will have already run a build for commits related to them
See https://github.com/jayaddison/html5lib-python/runs/1677406878 for example GitHub Actions build output corresponding to c217133. |
GitHub Actions provides 20 parallel workers, have you considered using a matrix to test each Python version in its own worker rather than all in parallel in a single worker? Should be much quicker. |
But otherwise, big 👍 for moving from Travis CI to GHA. |
@hugovk Thanks! Using a matrix strategy would seem ideal - the challenge is the combinatorial The It's worth pausing and thinking about this change for a little while before merge, I think. There may be a way to achieve the worker-per-environment goal in a different way - or perhaps it should be reported / discussed upstream. |
tox-dev/tox#659 may be a relevant issue to track relating to this |
The latest commits re-attempt a matrix build strategy via GitHub Actions; the generic This does have an unfortunate side-effect that it'll be trickier for developers with a local checkout of the repository to test the package against all Python versions by simply running |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: [2.7, 3.5, 3.6, 3.7, 3.8, pypy-2.7, pypy3] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB for review: do pypy-2.7
and pypy3
respectively correspond to pypy
and pypy3
as previously listed in tox.ini
?
Ok, my mistake previously @hugovk; I overcomplicated things. This does look feasible after all, with one caveat/tradeoff regarding developer experience for local checkouts. See https://github.com/jayaddison/html5lib-python/runs/1691598506 for an example multi-pipeline build via GHA using a matrix strategy |
... and perhaps that local checkout dev experience issue is now resolved too. Each GHA worker now runs The remaining tradeoff/downside is that the environment list now exists in https://github.com/jayaddison/html5lib-python/actions/runs/481474149 contains the latest build output as per commit 19cf7f7 |
Ping @gsnedders @jgraham @willkg |
Provides a migration path for #525.
Thepython debug.py
post-build step from.travis.yml
has not been migrated; GitHub Actions workflows support acontinue-on-error
configuration flag at the job and step level, but I don't yet see whether this can be used to provide an equivalent 'post-job' command.As of the initial version of this pull request, builds take place within a single GitHub Actions workflow that runstox
in parallel mode. Build output for each Python environment is present in the workflow console, but it's not as human-readable as the grouping provided by Travis CI.