regression-cicd-hooks
Integrate regression testing into CI/CD pipelines with baseline comparison and merge blocking on failure
What this skill does
# regression-cicd-hooks
Integrate regression testing into CI/CD pipelines with automated baseline comparison, merge blocking, and multi-platform support.
## Triggers
Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):
- "CI hooks" / "pipeline gates" → regression check in CI/CD
- "fail fast on regression" → CI regression gate
## Purpose
This skill automates regression detection in CI/CD workflows by:
- Integrating baseline comparisons into PR/MR pipelines
- Blocking merges when regressions detected
- Running regression checks on pre-commit hooks
- Supporting GitHub Actions, GitLab CI, and Gitea Actions
- Notifying teams of regression failures
- Storing baseline comparisons as pipeline artifacts
## Behavior
When triggered, this skill:
1. **Identifies CI/CD platform**:
- Detect existing CI configuration (.github, .gitlab-ci.yml)
- Determine platform (GitHub Actions, GitLab CI, Gitea Actions)
- Check for existing regression checks
- Identify project type and test framework
2. **Configures regression pipeline**:
- Add regression stage to workflow
- Configure baseline comparison step
- Set up artifact storage for results
- Configure merge blocking rules
- Add notification channels
3. **Implements local pre-commit hook**:
- Create `.git/hooks/pre-commit` script
- Add fast regression pattern checks
- Configure skip patterns for WIP commits
- Link to full CI regression checks
4. **Sets up multi-environment baselines**:
- Configure environment-specific baselines (dev, staging, prod)
- Set regression thresholds per environment
- Link baselines to git branches/releases
- Configure baseline update workflow
5. **Adds notifications**:
- Configure Slack/Discord/email alerts
- Add regression report to PR/MR comments
- Link to detailed comparison reports
- Tag relevant stakeholders
6. **Documents workflow**:
- Create regression CI documentation
- Add troubleshooting guide
- Document baseline update process
- Include developer quick-start
## Platform Integrations
### GitHub Actions
```yaml
# .github/workflows/regression-check.yml
name: Regression Tests
on:
pull_request:
branches: [main, develop]
push:
branches: [main]
jobs:
regression-baseline-check:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for baseline comparison
- name: Setup environment
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Download baseline
uses: actions/download-artifact@v4
with:
name: regression-baseline
path: .aiwg/testing/baselines/
continue-on-error: true # First run may not have baseline
- name: Run tests and capture output
run: |
npm test -- --json --outputFile=test-results.json
npm run benchmark -- --json > performance-results.json
- name: Compare to baseline
id: regression-check
run: |
aiwg baseline compare functional-baseline \
--current test-results.json \
--output regression-report.md \
--fail-on-regression
- name: Upload regression report
uses: actions/upload-artifact@v4
with:
name: regression-report
path: regression-report.md
retention-days: 30
- name: Comment on PR
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const report = fs.readFileSync('regression-report.md', 'utf8');
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `## Regression Check Results\n\n${report}`
});
- name: Block merge on regression
if: steps.regression-check.outcome == 'failure'
run: |
echo "::error::Regression detected. See report for details."
exit 1
update-baseline:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup environment
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Run tests and capture baseline
run: |
npm test -- --json --outputFile=baseline.json
npm run benchmark -- --json > performance-baseline.json
- name: Create baseline
run: |
aiwg baseline create functional-baseline \
--from baseline.json \
--git-commit ${{ github.sha }} \
--release ${{ github.ref_name }}
- name: Upload baseline
uses: actions/upload-artifact@v4
with:
name: regression-baseline
path: .aiwg/testing/baselines/
retention-days: 90
```
### GitLab CI
```yaml
# .gitlab-ci.yml
stages:
- test
- regression
- deploy
regression-check:
stage: regression
image: node:20
timeout: 15 minutes
script:
# Download baseline from artifacts
- apt-get update && apt-get install -y curl
- |
curl --location --output baseline.tar.gz \
--header "PRIVATE-TOKEN: $CI_JOB_TOKEN" \
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/artifacts/main/download?job=baseline-update"
- tar -xzf baseline.tar.gz || echo "No baseline found, first run"
# Run tests
- npm ci
- npm test -- --json --outputFile=test-results.json
# Compare to baseline
- |
aiwg baseline compare functional-baseline \
--current test-results.json \
--output regression-report.md \
--fail-on-regression
# Post to MR
- |
if [ "$CI_MERGE_REQUEST_IID" ]; then
curl --request POST \
--header "PRIVATE-TOKEN: $CI_JOB_TOKEN" \
--data "body=$(cat regression-report.md)" \
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/merge_requests/${CI_MERGE_REQUEST_IID}/notes"
fi
artifacts:
reports:
junit: test-results.json
paths:
- regression-report.md
expire_in: 30 days
rules:
- if: $CI_MERGE_REQUEST_ID
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
baseline-update:
stage: deploy
image: node:20
script:
- npm ci
- npm test -- --json --outputFile=baseline.json
- |
aiwg baseline create functional-baseline \
--from baseline.json \
--git-commit $CI_COMMIT_SHA \
--release $CI_COMMIT_TAG
artifacts:
paths:
- .aiwg/testing/baselines/
expire_in: 90 days
only:
- main
- tags
```
### Gitea Actions
```yaml
# .gitea/workflows/regression.yml
name: Regression Tests
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
regression-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Download baseline
run: |
curl -s -H "Authorization: token $(cat ~/.config/gitea/token)" \
"https://git.integrolabs.net/api/v1/repos/${{ github.repository }}/releases/latest/assets" \
| jq -r '.[] | select(.name=="baseline.tar.gz") | .browser_download_url' \
| xargs -I {} curl -L -o baseline.tar.gz {}
tar -xzf baseline.tar.gz || echo "First run, no baseline"
- name: Install and test
run: |
npm ci
npm test -- --json --outputFile=test-results.json
- name: Compare baseline
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.