Skip to content

chore(deps): bump actions/setup-python from 4 to 6 (#110) #108

chore(deps): bump actions/setup-python from 4 to 6 (#110)

chore(deps): bump actions/setup-python from 4 to 6 (#110) #108

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
jobs:
test:
name: Test with Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Cache Poetry dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install --with dev --no-interaction
- name: Check runtime dependencies
run: |
poetry run python - <<'PY'
import importlib, sys
missing = [m for m in ("pandas",) if importlib.util.find_spec(m) is None]
if missing:
print("Missing dependencies:", ", ".join(missing))
sys.exit(1)
PY
- name: Verify version matches tag
if: startsWith(github.ref, 'refs/tags/')
run: python scripts/check_version_match.py
- name: Run tests with coverage
run: poetry run pytest --cov=gen_surv --cov-report=xml --cov-report=term
- name: Upload coverage to Codecov
if: matrix.python-version == '3.11'
uses: codecov/codecov-action@v5
with:
files: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
lint:
name: Code Quality
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Cache Poetry dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-3.11-${{ hashFiles('**/poetry.lock') }}
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install --with dev --no-interaction
- name: Run pre-commit checks
run: poetry run pre-commit run --all-files