Skip to content

Add Python 3.13 support and simplify CI matrix (#392) #79

Add Python 3.13 support and simplify CI matrix (#392)

Add Python 3.13 support and simplify CI matrix (#392) #79

Workflow file for this run

# Workflow that runs on code changes after merge to main.
name: Code changes
on:
workflow_call:
push:
branches:
- main
paths:
- pyproject.toml
env:
HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}
POLICYENGINE_US_DATA_GITHUB_TOKEN: ${{ secrets.POLICYENGINE_US_DATA_GITHUB_TOKEN }}
jobs:
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check formatting
uses: "lgeiger/black-action@master"
with:
args: ". -l 79 --check"
Test:
permissions:
contents: "write" # Required for auth with Github Pages deploy
id-token: "write" # Required for auth with GCP
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.13'
- uses: "google-github-actions/auth@v2"
with:
workload_identity_provider: "projects/322898545428/locations/global/workloadIdentityPools/policyengine-research-id-pool/providers/prod-github-provider"
service_account: "policyengine-research@policyengine-research.iam.gserviceaccount.com"
- name: Install package
run: uv pip install -e .[dev] --system
- name: Download data inputs
run: make download
- name: Build datasets
run: make data
env:
PYTHON_LOG_LEVEL: INFO
- name: Save calibration log
uses: actions/upload-artifact@v4
with:
name: calibration_log.csv
path: calibration_log.csv
- name: Run tests
run: pytest
- name: Upload data
run: make upload
- name: Test documentation builds
run: make documentation
- name: Deploy Github Pages documentation
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs/_build/html
clean: true