Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate Travis to GitHub Actions (#78)
Migrate travis-ci to GitHub Actions.
- Loading branch information
1 parent
612ec93
commit a86ac00
Showing
7 changed files
with
89 additions
and
78 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,55 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [ master, develop ] | ||
pull_request: | ||
branches: [ master, develop ] | ||
|
||
jobs: | ||
build: | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
python-version: [ 3.9 ] | ||
include: | ||
- python-version: 3.5 | ||
os: ubuntu-latest | ||
- python-version: 3.6 | ||
os: ubuntu-latest | ||
- python-version: 3.7 | ||
os: ubuntu-latest | ||
- python-version: 3.8 | ||
os: ubuntu-latest | ||
- python-version: pypy3 | ||
os: ubuntu-latest | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
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 virtualenv | ||
python -m virtualenv venv | ||
make install | ||
- name: Run tests | ||
run: | | ||
if [ "$RUNNER_OS" == "Windows" ]; then | ||
nosetests --traverse-namespace | ||
else | ||
make test | ||
make local | ||
fi | ||
shell: bash | ||
- name: Upload coverage | ||
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
directory: ./_build/coverage |
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
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,30 @@ | ||
name: deploy | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["build"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
deploy: | ||
name: Publish Python package on release | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.9 | ||
- name: Prepare dist | ||
run: | | ||
make install | ||
make local | ||
- name: Publish a Python distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
*.iml | ||
*.pyc | ||
.coverage | ||
coverage.xml | ||
*.log | ||
venv | ||
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
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