Lint code #1
Workflow file for this run
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 check | |
run-name: Lint code | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
env: | |
PYTHON_VERSION: 3.8 | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- uses: snok/install-poetry@v1 | |
- name: Install dependencies | |
run: poetry install --only=main,lint | |
- name: Lint code | |
uses: liskin/gh-problem-matcher-wrap@v2 | |
with: | |
linters: flake8, isort | |
run: poetry run project lint | |
typing: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: poetry | |
- run: pip install poetry | |
- run: poetry install --only=main,typing | |
- name: Type check code | |
uses: liskin/gh-problem-matcher-wrap@v2 | |
continue-on-error: true | |
with: | |
linters: mypy | |
run: poetry run project check-types --show-column-numbers --no-error-summary | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- uses: snok/install-poetry@v1 | |
- name: Install docs dependencies | |
run: poetry install --only=main,docs | |
- uses: sphinx-doc/github-problem-matcher@master | |
name: Build docs | |
with: | |
run: poetry run project docs |