Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
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