[pre-commit.ci] pre-commit autoupdate #64
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: 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: cache deps | |
id: cache-deps | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: pydeps-${{ hashFiles('**/poetry.lock') }} | |
- name: install_dependencies_only | |
run: poetry install --no-interaction --no-root --with analysis | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
- name: install_project | |
run: poetry install --no-interaction | |
- 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 | |
run: | | |
source $VENV | |
mypy src/ |