name: Linting

on: [workflow_call]

jobs:
  lint-python:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 0

    - uses: actions/setup-python@v5
      with:
        python-version: 3.11

    - name: Install tox
      run: python -m pip install --upgrade tox==4.23.2 tox-uv~=1.16.0

    - name: Run static checks
      run: tox -e lint

  lint-ts:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 0

    - uses: actions/setup-node@v4
      with:
        node-version: lts/*

    - name: Install Dependencies
      run: npm ci

    - name: Lint UI
      run: npm run lint
