Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/actions/policyengine-us-main/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Set up policyengine-us with this Core
description: >-
Check out a policyengine-us commit into ./policyengine-us, install it from
its lock as its CI does, and replace the locked Core with the Core checkout
in ./core.
inputs:
ref:
description: The policyengine-us commit to check out.
required: true
runs:
using: composite
steps:
- name: Checkout policyengine-us
uses: actions/checkout@v6
with:
repository: PolicyEngine/policyengine-us
ref: ${{ inputs.ref }}
path: policyengine-us
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
# As policyengine-us's setup-system-ca action does before its tests.
- name: Update system certificate authorities
shell: bash
run: |
sudo apt-get update
sudo apt-get install --only-upgrade --yes ca-certificates
# update_itemization.sh turns off default branching, as policyengine-us's
# CI does before its tests.
- name: Install policyengine-us
shell: bash
working-directory: policyengine-us
run: |
uv sync --frozen --extra dev
bash ./update_itemization.sh
# The checkout replaces the locked Core even at the same version number,
# the step checks that it was installed from the checkout, and the
# dependency set must still resolve.
- name: Install this Core
shell: bash
working-directory: policyengine-us
run: |
uv pip install --python .venv/bin/python --reinstall-package policyengine-core ../core
uv run --no-sync python -c "import json; from importlib.metadata import distribution; url = json.loads(distribution('policyengine-core').read_text('direct_url.json'))['url']; print(url); assert url.startswith('file://'), url"
uv pip check --python .venv/bin/python
Loading
Loading