chore(ci): redesign test workflows into reusable+caller pattern#6
Merged
Conversation
Admin: purge sensitive data and add security docs
- SECURITY.md: set security contact to tech@civicdatalab.in - ADMIN_ANNOUNCE.md: set maintainer handle to @saqibmanan - CODE_OF_CONDUCT.md: add reporting contact, drop pre-release self-flag - .env.example: consolidate duplicated config blocks
Replace monolithic test-automation.yml with a composite setup action, a reusable _test.yml, and four caller workflows (pr, main, nightly, dispatch). Multistate now only runs on dev triggers; main deploys run smoke + analytics-non-multistate + component + dataset. Fixes the smoke artifact upload bug, removes Node deprecation warnings, and adds upstream-dispatch-setup docs for IDS-DRR-Frontend/Backend.
Test Results (smoke)37 tests 36 ✅ 3m 52s ⏱️ Results for commit 62effc0. ♻️ This comment has been updated with latest results. |
Local composite actions cannot self-checkout — the runner needs .github/actions/setup-test-env/action.yml on disk before the composite can be located. Callers must run actions/checkout@v4 first; only the test job in _test.yml needs the explicit step since summary already had its own checkout.
QA Tests passed
Download the consolidated-test-report artifact for the merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replace the monolithic
test-automation.yml(397 lines) with a composite setup action, a reusable_test.yml, and four focused caller workflows. Fixes the broken smoke artifact upload, removes Node deprecation warnings, and gates multistate to dev-only triggers.This PR is opened as a draft against
devto verifypr.yml(smoke) end-to-end before merging.Type of Change
Changes Made
New files
.github/actions/setup-test-env/action.yml— composite action for checkout, Python, deps, driver cache, and report dir creation. Single source of truth for setup; fixes the smoke-job artifact bug centrally..github/workflows/_test.yml— reusable workflow (workflow_call). Inputs:markers,shards,workers,target_env,test_path,bootstrap_states. Two jobs: matrix-shardedtestandsummary(merge + publish + PR comment)..github/workflows/pr.yml— PR → smoke (1 × 4,target_env=dev).paths-ignorefor docs;concurrencycancels superseded runs..github/workflows/main.yml— push to main → full suite (3 × 2,target_env=staging)..github/workflows/nightly.yml— cron0 2 * * *+ manual → multistate (4 × 2,target_env=dev, withbootstrap_states)..github/workflows/dispatch.yml—workflow_dispatch(scope/target_env inputs) +repository_dispatch(frontend-deployed/backend-deployed). Routes byclient_payload.environment:dev→ multistate;prod/staging/main→ smoke + analytics-non-multistate + component + dataset.docs/upstream-dispatch-setup.md— PAT + dispatch-step instructions forIDS-DRR-FrontendandIDS-DRR-Backend.Modified
conftest.py— htmlpath rewrite now only fires when the value equals the addopts default (reports/report.html). CI shard-specific--htmlpaths are preserved..github/workflows/README.md— rewritten for the new structure.Deleted
.github/workflows/test-automation.yml— replaced by the above.Trigger map (after merge)
pr.ymlsmokemain.ymlnightly.ymlmultistatedispatch.yml:on-dev-deploymultistatedispatch.yml:on-main-deploysmoke or (analytics and not multistate) or component or datasetdispatch.ymlTesting
actionlint -color(zero warnings).pr.yml) — pending.Manual steps required after merge
The cross-repo wiring lives in the upstream
IDS-DRR-FrontendandIDS-DRR-Backendrepos and cannot be done from this PR. Seedocs/upstream-dispatch-setup.mdfor the PAT/secret/dispatch-step instructions.Checklist
pytest,run_tests.sh,run_parallel_tests.shunchanged)Related Issues
N/A — internal CI redesign.