Skip to content
Merged
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
7 changes: 6 additions & 1 deletion .github/scripts/modal-run-integ-tests.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
#!/bin/bash
# Run simulation integration tests
# Usage: ./modal-run-integ-tests.sh <environment> <base-url>
# Usage: ./modal-run-integ-tests.sh <environment> <base-url> [us-version]
# Environment: beta runs all tests, prod excludes beta_only tests

set -euo pipefail

ENVIRONMENT="${1:?Environment required (beta or prod)}"
BASE_URL="${2:?Base URL required}"
US_VERSION="${3:-}"

cd projects/policyengine-apis-integ
uv sync --extra test

export simulation_integ_test_base_url="$BASE_URL"

if [ -n "$US_VERSION" ]; then
export simulation_integ_test_us_model_version="$US_VERSION"
fi

if [ "$ENVIRONMENT" = "beta" ]; then
echo "Running all simulation integration tests (including beta_only)"
uv run pytest tests/simulation/ -v
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/modal-deploy.reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
environment: ${{ inputs.environment }}
outputs:
simulation_api_url: ${{ steps.get-url.outputs.simulation_api_url }}
us_version: ${{ steps.versions.outputs.us_version }}

steps:
- name: Checkout repo
Expand Down Expand Up @@ -101,4 +102,4 @@ jobs:
run: ./scripts/generate-clients.sh

- name: Run simulation integration tests
run: .github/scripts/modal-run-integ-tests.sh "${{ inputs.environment }}" "${{ needs.deploy.outputs.simulation_api_url }}"
run: .github/scripts/modal-run-integ-tests.sh "${{ inputs.environment }}" "${{ needs.deploy.outputs.simulation_api_url }}" "${{ needs.deploy.outputs.us_version }}"
2 changes: 1 addition & 1 deletion projects/policyengine-api-simulation/src/modal/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from src.modal._image_setup import snapshot_models

# Get versions from environment or use defaults
US_VERSION = os.environ.get("POLICYENGINE_US_VERSION", "1.459.0")
US_VERSION = os.environ.get("POLICYENGINE_US_VERSION", "1.562.3")
UK_VERSION = os.environ.get("POLICYENGINE_UK_VERSION", "2.65.9")


Expand Down
9 changes: 5 additions & 4 deletions projects/policyengine-api-simulation/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Settings(BaseSettings):
access_token: str | None = None
timeout_in_millis: int = 600_000 # 10 minutes for full simulations
poll_interval_seconds: float = 5.0
us_model_version: str = "1.459.0"
us_model_version: str = "1.562.3"

model_config = SettingsConfigDict(env_prefix="simulation_integ_test_")

Expand Down
Loading