Skip to content

chore(deps): bump actions/checkout from 4 to 5 (#5) #52

chore(deps): bump actions/checkout from 4 to 5 (#5)

chore(deps): bump actions/checkout from 4 to 5 (#5) #52

Workflow file for this run

name: CI / build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
concurrency:
group: "ci-${{ github.ref }}"
cancel-in-progress: false
jobs:
python:
name: python (${{ matrix.python-version }})
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python-version: [ "3.11", "3.12" ]
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Cache Poetry
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: poetry-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-${{ runner.os }}-${{ matrix.python-version }}-
- name: Install deps
run: |
poetry install --no-interaction
- name: Lint (ruff)
run: |
mkdir -p _ci_logs
poetry run ruff check . --output-format=github 2>&1 | tee -a _ci_logs/ruff.log
- name: Format (black --check)
run: |
poetry run black --check . 2>&1 | tee -a _ci_logs/black.log
- name: Tests (pytest 95%+)
env:
PYTHONPATH: src
run: |
poetry run pytest -q 2>&1 | tee -a _ci_logs/pytest.log
- name: Type check (mypy src)
run: |
poetry run mypy src 2>&1 | tee -a _ci_logs/mypy.log
- name: Generate deps from poetry.lock
run: |
poetry run python scripts/gen_deps_from_poetry.py poetry.lock > deps.ci.json
echo "Deps count=$(jq 'length' deps.ci.json)"
- name: OSV scan (fail on high)
run: |
poetry run osv-vuln-bot --deps deps.ci.json --fail-on high 2>&1 | tee -a _ci_logs/osv_scan.log
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: logs-${{ matrix.python-version }}
path: _ci_logs
- name: Job summary
if: always()
run: |
echo "### CI logs for Python ${{ matrix.python-version }}" >> $GITHUB_STEP_SUMMARY
echo "- ruff/black/pytest/mypy/osv: See artifact logs-${{ matrix.python-version }}" >> $GITHUB_STEP_SUMMARY