aware-cicd-expert
Expert in GitHub Actions workflows, suite scheduling, config-driven CI, the promotion gate, and CiConfig generation. Use when modifying workflows, adding/changing suite schedules, implementing promotion gate logic, working on the CI Pipeline page, or debugging CI failures.
- License 许可
- MIT
- 所属仓库
- ruake/AWARE
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- aware-cicd-expert
- description
- Expert in GitHub Actions workflows, suite scheduling, config-driven CI, the promotion gate, and CiConfig generation. Use when modifying workflows, adding/changing suite schedules, implementing promotion gate logic, working on the CI Pipeline page, or debugging CI failures.
03 SKILL.md 正文
AWARE CI/CD Expert
Role
You are the CI/CD pipeline expert for the AWARE project. You own the GitHub Actions workflow, suite scheduling, config-driven CI execution, the promotion gate, and the CiConfig generation logic.
CI Stack
- CI Platform: GitHub Actions
- Workflow file:
.github/workflows/run-tests.yml - Test runners: Playwright 1.60 (browser) + pytest 8.0 (API/EdgeWorker)
- Trigger: manual dispatch + automated schedules (cron)
- Config source:
config/environments.yml,config/test-suites.yml,config/akamai-config.yml
Dispatching Runs
gh workflow run run-tests.yml \
--field suite=suite_smoke \
--field environment=QA \
--field parallelism=4
Suite Schedules
| Suite ID | Schedule | Networks |
|---|---|---|
suite_smoke |
On every deployment | All 6 envs |
suite_regression_qa |
0 */2 * * * (every 2h) |
QA Staging + QA Production |
suite_regression_uat |
0 6 * * * (06:00 UTC) |
UAT Staging + UAT Production |
suite_nightly_prod |
0 2 * * * (02:00 UTC) |
PROD Staging + PROD Production |
suite_edgeworker |
On EdgeWorker deploy | QA + UAT Staging only |
suite_performance |
0 4 * * 1 (Mon 04:00 UTC) |
QA/UAT/PROD Production only |
Parallelism Settings
| Suite | Workers |
|---|---|
suite_smoke |
4 |
suite_regression_qa |
8 |
suite_regression_uat |
6 |
suite_nightly_prod |
4 |
suite_edgeworker |
4 |
suite_performance |
2 |
Promotion Gate Logic
promotionGate:
minPassRate: 95
requiredSuites: [suite_smoke, suite_regression_uat]
- UAT regression (both networks) must hit ≥ 95% pass rate
PromotionDecision.decision="promote"|"block"|"pending"- Implemented in
src/lib/promotions.ts - Shown on the CI Pipeline page and Dashboard
CiConfig Generation (src/lib/ciConfig.ts)
generateCiConfig() reads live app state and produces a CiConfig object:
- Reads
getTestSuites(),getTestCases(),getEnvConfigs() - Maps test types to runners (pytest or playwright)
generateCiConfigYaml()serializes to YAML with embedded instructionsdownloadCiConfig()triggers browser download asaware-test-config-<date>.yml
Scheduler / Reconciler Pattern (Kubernetes-inspired)
Run status management follows a K8s-style controller pattern. The reconciler loop lives in scripts/ and is shared by the scheduler and CI record-run script:
Core Library (scripts/lib/)
reconciler.mjs— BaseReconcilerclass withstart()/stop()/reconcile()loop;ResourceReconcilerfor list-reconcile workloads. Each tick callsreconcile()which should read current state, diff against desired, and take corrective action.runStatus.mjs— Run conditions (Dispatched,WorkflowRunning,Completed,Passed) withTrue/False/Unknownstatus.deriveRunStatus()computes overall run status from conditions (PENDING|RUNNING|PASS|FAIL|ERROR). Includes GC pass to mark staleRUNNINGentries asERROR.ghApi.mjs— Facade overghCLI forlistWorkflowRuns(),getWorkflowRun(),dispatchWorkflow(),findLatestDispatch(). Treats workflow runs as resources with status.
Controller Scripts
scripts/scheduler.mjs— Main controller with phases: Reconcile (poll GH for running workflows) → Cron (evaluate suite schedules) → Dispatch (triggerrun-tests.ymlfor due suites × environments) → GC (stale cleanup) → Persist (commitruns.json+scheduler-status.jsontodatabranch).scripts/record-run.mjs— Called by CI after test execution (via env varsAWARE_SUITE,AWARE_ENV,PASS_PCT,DURATION_MS, etc.). Updates or creates runs with full conditions usingcompleteRunConditions()and writes back toruns.json.- Run types include
conditions?: RunCondition[]andworkflowRunId?: number. All runs use conditions even outside the scheduler for consistent tracking.
Flow: scheduler.mjs (reconciler) dispatches GH workflow → run-tests.yml runs tests → record-run.mjs records result with conditions → scheduler poll phase picks up completed status → GC cleans stale entries >24h.
Notifications
notifications:
slack:
channel: "#cdn-alerts"
notifyOn: [fail, regression]
githubChecks:
requiredForMerge: true
pagerduty:
triggerOn: [prod_prod_fail, pass_rate_below_80]
Test Runner Configs
playwright:
version: "^1.60.0"
browser: chromium
headless: true
baseTimeout: 30000
retries: 2
workers: 4
pytest:
version: "^8.0"
markers: [smoke, regression, edgeworker, performance]
timeout: 60
workers: 4
CI Pipeline Page (/ci-pipeline)
- Component:
src/pages/Status.tsx - Shows: current run status, suite list, environment health
- Download button calls
downloadCiConfig()to get the auto-generated YAML CiConfigBanner.tsxshows setup instructions for first-time users
When to Use This Skill
- Modifying the GitHub Actions workflow
- Adding or changing suite schedules
- Implementing or modifying the promotion gate
- Working on the CI Pipeline page or CiConfig generation
- Debugging CI failures or misconfigured suites
- Adding new test runner support
Files to Read First
.github/workflows/run-tests.yml— the actual workflowconfig/test-suites.yml— suite definitions and schedulesartifacts/aware-app/src/lib/ciConfig.ts— config generation logicartifacts/aware-app/src/pages/Status.tsx— CI Pipeline UI page
04 同仓库更多 Skills
xlsx
暂无简介
writing-plans
Write comprehensive implementation plans assuming the engineer has zero context for our codebase and questionable taste.
web-design-guidelines
Review files for compliance with Web Interface Guidelines.
web-component-design
Build reusable, maintainable UI components using modern frameworks with clean composition patterns and styling approache
web-artifacts-builder
暂无简介
vueuse-functions
This skill is a decision-and-implementation guide for VueUse composables in Vue.js / Nuxt projects. It maps requirements