Add CodeQL analysis workflow configuration #44
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: build and unit tests | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.12", "3.13"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: setup virtual env | |
| run: python3 -m venv .venv | |
| - name: setup packages | |
| run: | | |
| . .venv/bin/activate | |
| python -m pip install --upgrade pip | |
| python -m pip install -r requirements-dev.txt | |
| - name: audit dependencies | |
| run: | | |
| . .venv/bin/activate | |
| pip-audit -r requirements.txt | |
| - name: format check | |
| run: | | |
| . .venv/bin/activate | |
| black --check . --exclude .venv | |
| - name: lint | |
| run: | | |
| . .venv/bin/activate | |
| pylint --ignore=.venv --fail-under=9.75 *.py app/ | |
| - name: algorithm tests | |
| run: | | |
| . .venv/bin/activate | |
| pytest -v --cov=. --cov-fail-under=85 |