-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from Travis CI to GitHub Actions and use tox
- Loading branch information
Showing
4 changed files
with
77 additions
and
24 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,51 @@ | ||
--- | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- 3.6 | ||
- 3.7 | ||
- 3.8 | ||
- 3.9 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip tox tox-factor | ||
- name: Run tox targets for ${{ matrix.python-version }} | ||
run: | | ||
PYVERSION=$(python -c "import sys; print(''.join([str(sys.version_info.major), str(sys.version_info.minor)]))") | ||
python -m tox -f $(python -m tox --listenvs | grep "^py${PYVERSION}" | tr '\n' ',') | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip tox | ||
- name: Lint code | ||
run: python -m tox -e qa | ||
- name: Check readme | ||
run: python -m tox -e readme |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
.PHONY: test | ||
|
||
PYDIRS=setup.py awacs examples tests | ||
PYVERSION=`python -c "import sys; print(''.join([str(sys.version_info.major), str(sys.version_info.minor)]))"` | ||
|
||
test: | ||
pycodestyle ${PYDIRS} | ||
pyflakes ${PYDIRS} | ||
python setup.py test | ||
python -m tox -e qa | ||
python -m tox --listenvs | grep "^py${PYVERSION}" | tr "\n" "," | xargs python -m tox -f |
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,23 @@ | ||
[tox] | ||
envlist = | ||
py{36,37,38,39} | ||
qa,readme | ||
|
||
[testenv] | ||
commands = python -W error::DeprecationWarning -W error::PendingDeprecationWarning setup.py test {posargs} | ||
|
||
[testenv:qa] | ||
deps = | ||
pycodestyle | ||
pyflakes | ||
commands = | ||
pycodestyle --version | ||
pycodestyle --show-source --show-pep8 . | ||
pyflakes ./awacs | ||
|
||
[testenv:readme] | ||
deps = | ||
twine | ||
commands = | ||
python setup.py sdist bdist_wheel | ||
twine check dist/* |