Skip to content

Upload tiny datasets in CI pipeline #591

Upload tiny datasets in CI pipeline

Upload tiny datasets in CI pipeline #591

Workflow file for this run

# This workflow is used to check various parts of the
# run prior to merging:
# - The code's formatting
# - Versioning - note that this checks, but does not update
# - That the code builds successfully
# - That any automated tests pass
name: Pull request
on:
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "ruff>=0.9.0"
- name: Check formatting
run: ruff format --check .
test:
name: Test
runs-on: ubuntu-latest
env:
HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Install package
run: uv pip install -e ".[dev]" --system
- name: Download data inputs
run: make download
env:
HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}
- name: Build datasets
run: make data
env:
TESTING: "1"
- name: Save calibration log (constituencies)
uses: actions/upload-artifact@v4
with:
name: constituency_calibration_log.csv
path: constituency_calibration_log.csv
- name: Save calibration log (local authorities)
uses: actions/upload-artifact@v4
with:
name: la_calibration_log.csv
path: la_calibration_log.csv
- name: Run tests
run: make test