Update poetry.lock (#31) #70
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: 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 }} |