-
Notifications
You must be signed in to change notification settings - Fork 320
Move more Travis jobs to GitHub Actions #705
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
Changes from 8 commits
334fb23
5ae5dc9
8a3da57
f48b22f
0237a5c
c4a51f9
d0fdb26
6eb6962
7c65ce6
62159b7
e77e53c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,42 @@ | ||
name: Main | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: '0 0 * * *' # daily | ||
|
||
jobs: | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install tox | ||
run: python -m pip install tox | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel tox | ||
- name: Run linting | ||
run: python -m tox -e lint | ||
|
||
types: | ||
strategy: | ||
matrix: | ||
python: [3.6, 3.7, 3.8] | ||
Comment on lines
+25
to
+26
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. This duplicates the 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. 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 |
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel tox | ||
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. 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 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. There's also work in progress to support composite (e.g. reusable) actions:
But it looks like we're stuck with this for now. |
||
- name: Run type-checking | ||
run: python -m tox -e types | ||
|
||
test: | ||
strategy: | ||
matrix: | ||
|
@@ -24,12 +45,29 @@ jobs: | |
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: "Install dependencies" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel tox | ||
- name: Run tests | ||
run: python -m tox -e py # Run tox using the version of Python in `PATH` | ||
run: python -m tox -e py -- --cov-report xml | ||
- uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./coverage.xml | ||
name: ${{ matrix.python }} - ${{ matrix.platform }} | ||
fail_ci_if_error: true | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel tox | ||
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. Can we add 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. I like that idea, but it got me thinking that it would be sufficient (if not preferred) to let The output of |
||
- name: Build docs | ||
run: python -m tox -e docs |
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.
Do we want to make the
types
anddocs
jobs "Required" checks (along withlint
andtest
)? They were implicitly required by Travis.If so, I don't have permission to do that. Which of the @pypa/twine-maintainers does?
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.
I think they need to run on master before they can be made required?