Skip to content

chore: Update dependencies and add pre-commit for code linting and fo… #18

chore: Update dependencies and add pre-commit for code linting and fo…

chore: Update dependencies and add pre-commit for code linting and fo… #18

Workflow file for this run

name: test
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.12.3"]
poetry-version: ["1.8.3"]
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
# see details (matrix, python-version, python-version-file, etc.)
# https://github.com/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v2
- 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@v3
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
- name: Test with pytest
run: |
./.venv/bin/python -m pytest ./tests --cov=src --cov-report=xml --cov-report=html
- name: Lint with pylint
run: |
./.venv/bin/python -m pylint src
# - name: Check with mypy
# run: |
# ./.venv/bin/python -m mypy src
- name: Check with ruff
run: |
./.venv/bin/python -m ruff check