Skip to content

added postry install for dependencies in lint.yml #7

added postry install for dependencies in lint.yml

added postry install for dependencies in lint.yml #7

Workflow file for this run

name: Lint
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Cache Poetry virtualenv
uses: actions/cache@v2
with:
path: |
~/.cache/pypoetry
~/.cache/pip
key: ${{ runner.os }}-poetry-${{ hashFiles('**/pyproject.toml', '**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
${{ runner.os }}-
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Check if pyproject.toml and poetry.lock are in sync
run: poetry check
- name: Install dependencies
run: poetry install --no-interaction --no-root
- name: Lint with flake8
run: poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Run tests with pytest and measure coverage
run: poetry run pytest --cov=./ --cov-report html
- name: Lint with pylint
run: poetry run pylint **/*.py
- name: Format code with black
run: poetry run black . --check
- name: Check for security vulnerabilities with bandit
run: poetry run bandit -r .
- name: Generate code complexity report with radon
run: poetry run radon cc .