-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
5 changed files
with
452 additions
and
58 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,100 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
tags: [ '[0-9]+.[0-9]+.[0-9]+' ] | ||
pull_request: | ||
branches: | ||
- 'master' | ||
- '[0-9].[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
|
||
test: | ||
name: Test | ||
strategy: | ||
matrix: | ||
pyver: [3.8] | ||
os: [ubuntu] | ||
fail-fast: true | ||
runs-on: ${{ matrix.os }}-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Setup Python ${{ matrix.pyver }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.pyver }} | ||
- name: Run unittests | ||
env: | ||
COLOR: 'yes' | ||
run: | | ||
pip install -U setuptools pip | ||
pip install -U pipenv codecov | ||
pipenv lock | ||
pipenv sync --dev | ||
pipenv check || true | ||
pipenv graph | ||
make flake mototest | ||
pre-deploy: | ||
name: Pre-Deploy | ||
runs-on: ubuntu-latest | ||
needs: test | ||
# Run only on pushing a tag | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Dummy | ||
run: | | ||
echo "Predeploy step" | ||
build-tarball: | ||
name: Tarball | ||
runs-on: ubuntu-latest | ||
needs: pre-deploy | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Setup Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Make sdist | ||
run: | ||
python setup.py sdist | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
deploy: | ||
name: Deploy | ||
needs: [build-tarball] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install twine | ||
run: | | ||
python -m pip install twine | ||
- name: Download dists | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist | ||
- name: PyPI upload | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
twine upload dist/* |
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
Oops, something went wrong.