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

Move more Travis jobs to GitHub Actions #705

Merged
merged 11 commits into from Oct 12, 2020

Conversation

bhrutledge
Copy link
Contributor

@bhrutledge bhrutledge commented Oct 5, 2020

Towards #650.

Changes

  • Remove redundant jobs from Travis

  • Move tox -e types to main workflow

  • Move tox -e docs to main workflow

  • Update setup-python action

TODO

  • Update docs to refer to GH Actions instead of Travis

  • Move Codecov to test job

    WRT to replacing Travis with GH Actions, this seems less impactful than replacing Codecov.

  • Add on.schedule to run daily

  • DRY out workflows (e.g. python-version, "Install dependencies")

  • Update "Required" checks

  • Later: Add publishing workflow

Comment on lines 27 to 32
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel tox
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This "stanza" duplicated in all jobs, and I haven't looked into ways to DRY it out. There's an open feature request on the setup-python action.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines +22 to +23
matrix:
python: [3.6, 3.7, 3.8]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This duplicates the test matrix. It'd be nice to specify it once, as well as the "latest Python" to use in the other jobs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TIL about YAML anchors and aliases, which are supported by Travis, but not (yet) by GitHub Actions.

There's a discussion thread about how to share matrix between jobs, but the documented configuration seems more complex than it's worth.

@bhrutledge bhrutledge requested a review from di October 5, 2020 11:04
@bhrutledge bhrutledge mentioned this pull request Oct 5, 2020
7 tasks
- name: Run linting
run: python -m tox -e lint

types:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we want to make the types and docs jobs "Required" checks (along with lint and test)? They were implicitly required by Travis.

If so, I don't have permission to do that. Which of the @pypa/twine-maintainers does?

Copy link
Member

Choose a reason for hiding this comment

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

I think they need to run on master before they can be made required?

@bhrutledge bhrutledge marked this pull request as ready for review October 10, 2020 10:40
@bhrutledge
Copy link
Contributor Author

@di Since you kicked off this effort, any thoughts on this before merge? In particular, I'm curious about the "Required" checks, mentioned in #705 (comment).

python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel tox
Copy link
Member

Choose a reason for hiding this comment

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

Can we add .github/actions/requirements.txt with these and run python -m pip install --upgrade -r .github/actions/requirements.txt instead? That way all of these are less duplicated? Helps when we move to something else and might be a decent pattern to upstream to the python action

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like that idea, but it got me thinking that it would be sufficient (if not preferred) to let tox manage the versions of pip, setuptools, and wheel, so in 7c65ce6 this has been reduced to pip install tox.

The output of pip list shows that the testenvs are using the latest versions, but if we want more control in the future, we can use the requires and download options in tox.ini (with the caveat that there's an open issue re: download = true.

@jaraco
Copy link
Member

jaraco commented Oct 11, 2020

Inspired by this work, I’ve updated jaraco/skeleton to prefer GHA to Azure pipelines including the publishing job jaraco/skeleton#24. Feel free to borrow any of that for publishing support.

@bhrutledge
Copy link
Contributor Author

Thanks for the feedback; merging as-is, and I'll follow-up with a PR for release.

@bhrutledge bhrutledge merged commit 2c3d8e1 into pypa:master Oct 12, 2020
@bhrutledge bhrutledge deleted the 650-more-actions branch October 12, 2020 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants