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
6 changes: 6 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ jobs:
- name: Run push-time tests
run: make test
env:
RUNTIME_CACHE_MODE: local
RUNTIME_CACHE_URL: redis://127.0.0.1:6379/0
RUNTIME_CACHE_URL_SECRET_RESOURCE: ""
RUNTIME_CACHE_CA_CERT_SECRET_RESOURCE: ""
RUNTIME_CACHE_ENVIRONMENT: test
RUNTIME_CACHE_SERVICE: api
POLICYENGINE_DB_PASSWORD: ${{ secrets.POLICYENGINE_DB_PASSWORD }}
POLICYENGINE_GITHUB_MICRODATA_AUTH_TOKEN: ${{ secrets.POLICYENGINE_GITHUB_MICRODATA_AUTH_TOKEN }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
Expand Down
1 change: 1 addition & 0 deletions changelog.d/staging-cache-test-environment.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix the post-merge staging workflow so its predeployment test suite uses the local Redis service instead of inheriting managed-cache secret references.
17 changes: 17 additions & 0 deletions tests/unit/test_cloud_run_deploy_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -1727,6 +1727,23 @@ def test_push_workflow_tests_app_engine_and_cloud_run_staging_tracks():
)


def test_push_workflow_uses_local_redis_for_predeployment_test_suite():
staging = _workflow_job_block(_push_workflow(), "deploy-staging")
test_step_start = staging.index("- name: Run push-time tests")
test_step_end = staging.index(
"- name: Validate App Engine deployment configuration",
test_step_start,
)
test_step = staging[test_step_start:test_step_end]

assert "RUNTIME_CACHE_MODE: local" in test_step
assert "RUNTIME_CACHE_URL: redis://127.0.0.1:6379/0" in test_step
assert 'RUNTIME_CACHE_URL_SECRET_RESOURCE: ""' in test_step
assert 'RUNTIME_CACHE_CA_CERT_SECRET_RESOURCE: ""' in test_step
assert "RUNTIME_CACHE_ENVIRONMENT: test" in test_step
assert "RUNTIME_CACHE_SERVICE: api" in test_step


def test_push_workflow_staging_fully_gates_all_production_deployments():
workflow = _push_workflow()
app_engine_candidate = _workflow_job_block(workflow, "deploy-production-candidate")
Expand Down
Loading