Skip to content

main -> Lint ( 1 )

main -> Lint ( 1 ) #8

Workflow file for this run

---
name: Lint
on:
push:
branches: [master, main]
# only when python files are changed
paths:
- '**.py'
pull_request:
branches: [master, main]
workflow_dispatch:
# set the run-name
run-name: ${{ github.ref_name }} -> Lint (
${{ github.run_attempt }}
)
jobs:
lint:
name: Lints the code using specified linters
runs-on: ubuntu-latest
steps:
- name: Echo current date and time
id: datetime
run: |
echo "datetime: $(date '+%Y-%m-%d %H:%M:%S')"
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install black
pip install ruff
pip install mypy
- name: Lint with black
run: |
black --check src
# ignore E501 (line too long) for now
- name: Lint with ruff
run: |
ruff check src --ignore=E501,I001
- name: Lint with mypy
run: |
mypy src --ignore-missing-imports