F4KRP-125 Get polyline from stops #397
This file contains hidden or 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 codebase | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "frontend/**" | |
| - "backend/python/**" | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - "frontend/**" | |
| - "backend/python/**" | |
| jobs: | |
| run-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Filter changed files | |
| uses: dorny/paths-filter@v2 | |
| id: changes | |
| with: | |
| filters: | | |
| frontend: | |
| - "frontend/**" | |
| python-backend: | |
| - "backend/python/**" | |
| - name: Set up pnpm | |
| if: steps.changes.outputs.frontend == 'true' | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Set up Node.js | |
| if: steps.changes.outputs.frontend == 'true' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.11.1" | |
| cache: "pnpm" | |
| cache-dependency-path: frontend/pnpm-lock.yaml | |
| - name: Install Node.js dependencies | |
| if: steps.changes.outputs.frontend == 'true' | |
| run: pnpm install --frozen-lockfile | |
| working-directory: ./frontend | |
| - name: Lint frontend | |
| if: steps.changes.outputs.frontend == 'true' | |
| working-directory: ./frontend | |
| run: pnpm lint | |
| - name: Set up Python | |
| if: steps.changes.outputs.python-backend == 'true' | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Cache pip dependencies | |
| if: steps.changes.outputs.python-backend == 'true' | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install Python dependencies | |
| if: steps.changes.outputs.python-backend == 'true' | |
| working-directory: ./backend/python | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run Ruff linter | |
| if: steps.changes.outputs.python-backend == 'true' | |
| working-directory: ./backend/python | |
| run: ruff check . --config pyproject.toml | |
| - name: Run Ruff formatter check | |
| if: steps.changes.outputs.python-backend == 'true' | |
| working-directory: ./backend/python | |
| run: ruff format --check . --config pyproject.toml | |
| - name: Cache mypy cache | |
| if: steps.changes.outputs.python-backend == 'true' | |
| uses: actions/cache@v3 | |
| with: | |
| path: backend/python/.mypy_cache | |
| key: ${{ runner.os }}-mypy-${{ hashFiles('backend/python/**/*.py') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mypy- | |
| - name: Run MyPy type checker | |
| if: steps.changes.outputs.python-backend == 'true' | |
| working-directory: ./backend/python | |
| run: mypy . --config-file mypy.ini |