Skip to content

Apply suggestions from code review #34

Apply suggestions from code review

Apply suggestions from code review #34

Workflow file for this run

name: Lint-Test-Mypy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install and configure poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Disable modern installer
run: poetry config installer.modern-installation false
- name: Load cached venv
id: cached-pip-wheels
uses: actions/cache@v3
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --no-root --with analysis
if: steps.cache.outputs.cache-hit != 'true'
- name: Install project
run: poetry install --no-interaction ${{ inputs.poetry-extras }}
- name: Analysing the code with pylint
run: |
source $VENV
pylint src/ || pylint-exit $?
- name: Running tests
run: |
source $VENV
pytest tests/
- name: Running Mypy analysis
uses: python/mypy@master
with:
paths: "src/"