Fixed mypy Errors #72
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: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependecies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pipenv | |
pipenv install --dev | |
- name: Lint with ruff | |
run: | | |
pipenv run ruff --output-format=github . | |
- name: Type check with mypy | |
run: | | |
pipenv run mypy pykoplenti/ tests/ | |
- name: Test with pytest | |
run: | | |
pipenv run pytest --junitxml=junit/test-results.xml --cov pykoplenti --cov-report=xml --cov-report=html | |
- name: Test with tox | |
run: | | |
pipenv run tox | |
- name: Build package | |
run: | | |
pipenv run build | |
- name: Upload packages to github | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist/* | |
deploy: | |
if: startsWith(github.event.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/pykoplenti | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishi | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install dependecies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pipenv | |
pipenv install --dev | |
- name: Build package | |
run: | | |
pipenv run build | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |