Skip to content

Specify nitpick_ignore #80

Specify nitpick_ignore

Specify nitpick_ignore #80

Workflow file for this run

name: ci
on:
pull_request:
push:
branches: [main]
tags: ['*']
jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: pip install poetry
- run: poetry install
- run: poetry run black --check .
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: pip install poetry
- run: poetry build
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: pip install poetry
- run: poetry install
- run: poetry run flake8
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: pip install poetry
- run: poetry install
- run: poetry run mypy .
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: pip install poetry
- run: poetry install
- run: poetry run pytest --cov --cov-report=xml
- uses: codecov/codecov-action@v3
if: ${{ matrix.python-version == '3.10' }}
publish:
runs-on: ubuntu-latest
needs: [black, build, flake8, mypy, pytest]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}