Update args #89
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: build | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install Graphviz | |
uses: ts-graphviz/setup-graphviz@v1 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Build package | |
run: | | |
poetry install | |
poetry build | |
- name: Test package | |
run: poetry run pytest -v tests/ | |
- name: Lint package | |
run: poetry run black --check --diff . | |
deploy: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
needs: test | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install Graphviz | |
uses: ts-graphviz/setup-graphviz@v1 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Build package | |
run: | | |
poetry install | |
poetry build | |
- name: Publish package to PyPi | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |