Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
100 lines (86 sloc)
2.49 KB
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
name: master | |
on: | |
push: | |
branches: | |
- master | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_PUSH_USER }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PUSH_PASSWORD }} | |
jobs: | |
test: | |
runs-on: [[ workflow.runner_version ]] | |
strategy: | |
matrix: | |
python: | |
- [[ workflow.python27 ]] | |
- [[ workflow.python37 ]] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install deps | |
run: PYTHON_VERSION=${{ matrix.python }} make install | |
- name: Run tests | |
run: PYTHON_VERSION=${{ matrix.python }} make test | |
lint: | |
runs-on: [[ workflow.runner_version ]] | |
strategy: | |
matrix: | |
python: | |
- [[ workflow.python27 ]] | |
- [[ workflow.python37 ]] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install deps | |
run: PYTHON_VERSION=${{ matrix.python }} make install | |
- name: Run linters | |
run: PYTHON_VERSION=${{ matrix.python }} make lint | |
check_package: | |
runs-on: [[ workflow.runner_version ]] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: [[ workflow.python37 ]] | |
- name: Install deps | |
run: PYTHON_VERSION=[[ workflow.python37 ]] make install | |
- name: Check package | |
run: PYTHON_VERSION=[[ workflow.python37 ]] make check-package | |
check_docs: | |
runs-on: [[ workflow.runner_version ]] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: [[ workflow.python37 ]] | |
- name: Check documentation | |
run: PYTHON_VERSION=[[ workflow.python37 ]] make docs | |
build: | |
runs-on: [[ workflow.runner_version ]] | |
needs: [test, lint, check_package, check_docs] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: [[ workflow.python37 ]] | |
- name: GitHub tag bump | |
id: tag | |
uses: anothrNick/github-tag-action@1.7.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Fix lib version | |
run: | | |
echo "__version__ = '${{ steps.tag.outputs.new_tag }}'" > version.py | |
- name: Install deps | |
run: PYTHON_VERSION=[[ workflow.python37 ]] make install | |
- name: Build library | |
run: make build |