Skip to content

🔖 Update version to 0.3.3 #80

🔖 Update version to 0.3.3

🔖 Update version to 0.3.3 #80

Workflow file for this run

name: Test & Code Quality
on:
push:
branches: [ "main" ]
pull_request:
types: ["opened", "synchronize"]
permissions:
contents: read
pull-requests: write
id-token: write
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
poetry-version: ["1.2.2"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install
- name: Lint with ruff
run: poetry run ruff .
- name: Check with black
run: poetry run black . --check
- name: Check with mypy
run: poetry run mypy . --strict
- name: Test with pytest
run: |
poetry run pytest . --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=./ | tee pytest-coverage.txt
poetry run coverage html --title="Coverage for ${{ github.sha }}"
echo "## Coverage Report" >> $GITHUB_STEP_SUMMARY
echo "$(poetry run coverage report --format=markdown)" >> $GITHUB_STEP_SUMMARY
- name: Store coverage files
if: ${{ matrix.python-version }} == '3.11'
uses: actions/upload-artifact@v3
with:
name: htmlcov
path: htmlcov
- name: Pytest coverage comment
if: github.event_name == 'pull_request'
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml