-
Notifications
You must be signed in to change notification settings - Fork 211
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
Test on GitHub Actions #494
Changes from all commits
db5d7c9
3490ccb
f81aa0c
71976eb
a948e89
f4a88d6
6395ece
96f9aad
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Examples | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
env: | ||
FORCE_COLOR: 1 | ||
|
||
jobs: | ||
examples: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["pypy-3.7", "3.9"] | ||
target: [ | ||
"src-layout", | ||
"adhoc-layout", | ||
] | ||
include: | ||
# Add new helper variables to existing jobs | ||
- {python-version: "pypy-3.7", tox-python-version: "pypy3"} | ||
- {python-version: "3.9", tox-python-version: "py39"} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: | ||
examples-v1-${{ hashFiles('**/tox.ini') }} | ||
restore-keys: | | ||
examples-v1- | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -U wheel | ||
python -m pip install --progress-bar=off tox -rci/requirements.txt | ||
|
||
- name: Examples | ||
run: | | ||
cd examples/${{ matrix.target }} | ||
tox -v -e ${{ matrix.tox-python-version }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Lint | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
env: | ||
FORCE_COLOR: 1 | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
toxenv: ["check", "docs"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: | ||
lint-v1-${{ hashFiles('**/tox.ini') }} | ||
restore-keys: | | ||
lint-v1- | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -U wheel | ||
python -m pip install --progress-bar=off tox -rci/requirements.txt | ||
|
||
- name: Lint ${{ matrix.toxenv }} | ||
run: | | ||
tox -v -e ${{ matrix.toxenv }} |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,4 +71,4 @@ The final report option can also suppress printing to the terminal:: | |
|
||
This mode can be especially useful on continuous integration servers, where a coverage file | ||
is needed for subsequent processing, but no local report needs to be viewed. For example, | ||
tests run on Travis-CI could produce a .coverage file for use with Coveralls. | ||
tests run on GitHub Actions could produce a .coverage file for use with Coveralls. | ||
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 is a CI recommendation and coverage provider recommendation, perhaps more tools could go here? Or pytest-cov could collect sponsorship to recommend a specific CI provider and coverage provider? eg GitLab has integrated support for coverage files (and recommend pytest-cov!) https://docs.gitlab.com/ee/user/project/merge_requests/test_coverage_visualization.html#python-example just a heads up: no need to worry about this now in this PR though imho |
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.
is there a reason for publishing the github workflow to pypi? they both use
actions/checkout@v2
which won't work without a live git repo and can't work from the sdistThere 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.
Yes, the reason is
.travis.yml .appveyor.yml
were/is included below, so I was aiming for parity.Can remove if you like?
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 don't know the best option here is.
I assume all these includes come as a result of
check-manifest
's default recommendation of including files rather than excluding them. I think using the "wheel_from_sdist",build
strategy and then using that wheel in tox is the state of the art for ensuring your MANIFEST is correct pypa/build#257another option is to follow pytest-dev/pytest's approach of using setuptools-scm, which makes the MANIFEST.in redundant
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.
No strong opinion here, although I use setuptools-scm elsewhere and it makes things easy. Something for a followup issue?
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 it's fair to include it in the sdist, considering travis stuff was previously included, and it would be useful to have some evidence in the sdist of how that particular release was supposed to be tested.