Skip to content

Add CodeQL analysis workflow configuration #44

Add CodeQL analysis workflow configuration

Add CodeQL analysis workflow configuration #44

Workflow file for this run

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