Linting code and type checking #37
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
# Copyright (c) 2023-2024 tracetronic GmbH | |
# | |
# SPDX-License-Identifier: MIT | |
name: Lint | |
run-name: Linting code and type checking | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-22.04 | |
env: | |
PY_VERSION: '3.12' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PY_VERSION }} | |
- name: Install virtual environment | |
run: pip3 install poetry | |
- name: Ensure Python version | |
run: poetry env use ${{ env.PY_VERSION }} | |
- name: Install dependencies | |
run: poetry install --without workflow --no-root | |
- name: Execute Linting | |
run: poetry run pylint --rcfile default.pylintrc testguide_report_generator | |
- name: Execute Type Checking | |
run: poetry run mypy . |