-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Migrate to github actions for CI
- add separate environment in tox for linters and docs. - switch to codecov for coverage since coveralls doesn't play well with github-actions. - add wheels and setuptools to the environment. Thanks travis for their service till now.
- Loading branch information
1 parent
a539232
commit ae75a9a
Showing
8 changed files
with
206 additions
and
77 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,45 @@ | ||
name: Docs | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'docs/**' | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
paths: | ||
- 'docs/**' | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
name: docs | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('docs/source/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Ensure latest setuptools | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
- name: Install dependecies | ||
run: | | ||
python -m pip install --upgrade pip tox | ||
- name: Build docs | ||
run: | | ||
tox -e docs |
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,35 @@ | ||
name: Linters | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
|
||
jobs: | ||
flake8: | ||
name: flake8 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Ensure latest setuptools | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
- name: Install dependecies | ||
run: | | ||
python -m pip install flake8 | ||
- name: flake8 | ||
uses: liskin/gh-problem-matcher-wrap@v1 | ||
with: | ||
linters: flake8 | ||
run: flake8 comment |
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,39 @@ | ||
name: Test Release | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- staging | ||
|
||
jobs: | ||
build-n-publish: | ||
name: Build and publish Python 🐍 distributions 📦 to TestPyPI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Ensure latest setuptools | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
- name: Build wheel and source distribution | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Publish distribution 📦 to Test PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
verbose: true # allows potentially easier debugging. | ||
|
||
|
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: Tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
|
||
jobs: | ||
tests: | ||
name: Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
max-parallel: 5 | ||
matrix: | ||
python-version: | ||
- 3.6 | ||
- 3.7 | ||
- 3.8 | ||
- 3.9 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('test/example/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip install --upgrade tox tox-py codecov | ||
sudo apt-get install gettext | ||
- name: Run tox targets for ${{ matrix.python-version }} | ||
run: | | ||
tox --py current | ||
- name: Coverage reporting | ||
run: | | ||
coverage combine | ||
codecov |
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
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