-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
76 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
pull_request: | ||
branches: ["master"] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
tests: | ||
name: "Python ${{ matrix.python-version }}" | ||
runs-on: "ubuntu-latest" | ||
env: | ||
USING_COVERAGE: "3.6,3.7,3.8,3.9" | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.6", "3.7", "3.8", "3.9"] | ||
|
||
steps: | ||
- uses: "actions/checkout@v2" | ||
- uses: "actions/setup-python@v2" | ||
with: | ||
python-version: "${{ matrix.python-version }}" | ||
- name: "Install dependencies" | ||
run: | | ||
set -xe | ||
python -VV | ||
python -m site | ||
python -m pip install --upgrade pip wheel poetry | ||
python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions | ||
- name: "Run tox targets for ${{ matrix.python-version }}" | ||
run: "python -m tox" | ||
|
||
# We always use a modern Python version for combining coverage to prevent | ||
# parsing errors in older versions for modern code. | ||
- uses: "actions/setup-python@v2" | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: "Upload coverage to Codecov" | ||
if: "contains(env.USING_COVERAGE, matrix.python-version)" | ||
uses: "codecov/codecov-action@v1" | ||
with: | ||
fail_ci_if_error: true | ||
|
||
package: | ||
name: "Build & verify package" | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- uses: "actions/checkout@v2" | ||
- uses: "actions/setup-python@v2" | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: "Install poetry, check-wheel-content, and twine" | ||
run: "python -m pip install twine check-wheel-contents" | ||
- name: "Build package" | ||
run: "python setup.py sdist bdist_wheel" | ||
- name: "List result" | ||
run: "ls -l dist" | ||
- name: "Check wheel contents" | ||
run: "check-wheel-contents dist/*.whl" | ||
- name: "Check long_description" | ||
run: "python -m twine check dist/*" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters