[dev]: dedup trackers #405
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: Static code analyzer | |
| on: | |
| pull_request: | |
| permissions: read-all | |
| jobs: | |
| analyze_code: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] | |
| defaults: | |
| run: | |
| shell: sh | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Set up Python | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Poetry manually for Legacy Python (3.8 & 3.9) | |
| if: matrix.python-version == '3.8' || matrix.python-version == '3.9' | |
| run: | | |
| python -m pip install --upgrade "pip<23" "setuptools<60" "virtualenv<20.25" "installer<0.7" | |
| pip install poetry==1.8.5 | |
| - name: Set Up Poetry (abatilo) for >= 3.10 | |
| if: matrix.python-version != '3.8' && matrix.python-version != '3.9' | |
| uses: abatilo/actions-poetry@e78f54a89cb052fff327414dd9ff010b5d2b4dbd # v3.0.1 | |
| with: | |
| poetry-version: 2.1.3 | |
| - name: Install dependencies | |
| run: | | |
| poetry install --sync -v | |
| mkdir .mypy_cache | |
| - name: Checking if imports are sorted correctly | |
| run: poetry run isort --check --diff -l 120 --profile black catalystwan | |
| - name: Check static-typing | |
| run: poetry run mypy --show-error-codes --show-error-context --pretty --install-types --non-interactive catalystwan --cache-dir=.mypy_cache/ --disable-error-code override | |
| - name: Check code style | |
| run: poetry run flake8 catalystwan |