Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jgraham merged 19 commits intohtml5lib:masterfromjayaddison:github-workflows/python-tox
May 19, 2021
Merged

Add GitHub Actions workflow for tox#527

jgraham merged 19 commits intohtml5lib:masterfromjayaddison:github-workflows/python-tox
May 19, 2021

Conversation

jayaddison
Copy link
Contributor

@jayaddisonjayaddison commentedJan 10, 2021
edited
Loading

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.

@jayaddison
Copy link
ContributorAuthor

Seehttps://github.com/jayaddison/html5lib-python/runs/1677406878 for example GitHub Actions build output corresponding toc217133.

@hugovk
Copy link
Contributor

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.

@hugovk
Copy link
Contributor

But otherwise, big 👍 for moving from Travis CI to GHA.

@jayaddison
Copy link
ContributorAuthor

@hugovk Thanks! Using a matrix strategy would seem ideal - the challenge is thecombinatorialtoxenvlist, since the Python interpreter versions provided in GitHub Actions don't correspond to thetox.ini-defined interpreter names.

Thetox-gh-actions plugin is fairly widely adopted to solve more-or-less this problem, and it does that by reading a Python-version-to-environment mapping from thetox.ini file (example).

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.

@jayaddison
Copy link
ContributorAuthor

tox-dev/tox#659 may be a relevant issue to track relating to this

@jayaddison
Copy link
ContributorAuthor

The latest commits re-attempt a matrix build strategy via GitHub Actions; thegenericpy prefix fortox generative names should map to the 'current default Python interpreter', so the generative factor is removed fromtox.ini and replaced by the GHA YAML configuration.

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 runningtox. Instead it will test against their default Python interpreter. That doesn't seem perfect.

runs-on: ubuntu-latest
strategy:
matrix:
python: [2.7, 3.5, 3.6, 3.7, 3.8, pypy-2.7, pypy3]
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

NB for review: dopypy-2.7 andpypy3 respectively correspond topypy andpypy3 as previously listed intox.ini?

@jayaddison
Copy link
ContributorAuthor

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.

Ok, my mistake previously@hugovk; I overcomplicated things. Thisdoes look feasible after all, with one caveat/tradeoff regarding developer experience for local checkouts.

Seehttps://github.com/jayaddison/html5lib-python/runs/1691598506 for an example multi-pipeline build via GHA using a matrix strategy

@jayaddison
Copy link
ContributorAuthor

... and perhaps that local checkout dev experience issue is now resolved too. Each GHA worker now runstox -e py, invoking the test suite for a single Python interpreter, as configured via the matrix worker environment list.

The remaining tradeoff/downside is that the environment list now exists intox.ini (for local workflows) and is duplicated in the GHA YAML file.

https://github.com/jayaddison/html5lib-python/actions/runs/481474149 contains the latest build output as per commit19cf7f7

hugovk reacted with thumbs up emoji

@jayaddison
Copy link
ContributorAuthor

Ping@gsnedders@jgraham@willkg

@jgrahamjgraham merged commit2f25bf2 intohtml5lib:masterMay 19, 2021
@jayaddisonjayaddison deleted the github-workflows/python-tox branchMay 19, 2021 18:33
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jgrahamjgrahamjgraham approved these changes

@hugovkhugovkhugovk approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@jayaddison@hugovk@jgraham

[8]ページ先頭

©2009-2025 Movatter.jp