Skip to content

๐Ÿ’„ Add linter #1

๐Ÿ’„ Add linter

๐Ÿ’„ Add linter #1

Workflow file for this run

name: Python application
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
env:
POETRY_BIN: /opt/poetry/bin
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.12
- name: Set up Poetry cache
id: cache-poetry
uses: actions/cache@v4
with:
path: /opt/poetry
key: ${{ runner.os }}-poetry
- name: Install Poetry
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: |
curl -sSL https://install.python-poetry.org | python3 -
$POETRY_BIN/poetry --version
- name: Set up Poetry dependencies cache
uses: actions/cache@v4
id: cached-poetry-dependencies
with:
path: .venv
key: ${{ runner.os }}-venv
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: |
$POETRY_BIN/poetry --version
$POETRY_BIN/poetry config --local virtualenvs.in-project true
$POETRY_BIN/poetry install
- name: Lint with pylint
run: |
$POETRY_BIN/poetry run pylint *.py