Skip to content

[pre-commit.ci] pre-commit autoupdate #405

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #405

Workflow file for this run

name: Poetry Testing
on:
- push
- pull_request
jobs:
ci:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
poetry-version: ["1.7.1"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Setup a local virtual environment (if no poetry.toml file)
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v4
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install the project dependencies
run: poetry install --all-extras
- name: Ensure xdist
run: poetry add pytest-xdist
- name: Run the automated tests (for example)
run: poetry run pytest -n 8 --cov-report xml:cov.xml --cov src --cov-report term-missing --durations-min=1 --durations=0
- name: Upload coverage report
uses: codecov/[email protected]
with:
files: ./cov.xml