Skip to content

fix(ci): add Cypress E2E workflow#266

Merged
prajjwalkumar17 merged 38 commits intomainfrom
feature/add-cypress-ci-workflow
Apr 29, 2026
Merged

fix(ci): add Cypress E2E workflow#266
prajjwalkumar17 merged 38 commits intomainfrom
feature/add-cypress-ci-workflow

Conversation

@jagan-jaya
Copy link
Copy Markdown
Collaborator

This PR adds a GitHub Actions workflow to run Cypress E2E tests in CI.

What this does

  • Builds Decision Engine from the PR source code (not published images)
  • Shares the built Docker image across all test jobs via artifact
  • Runs all 10 Cypress spec files in parallel (matrix strategy)
  • Each job has an isolated stack (API + PostgreSQL + Redis + Kafka + ClickHouse)
  • Uploads screenshots on test failure

Workflow overview

  1. Build job: Compiles Decision Engine once, saves as artifact
  2. 10 parallel test jobs: Each downloads the image, starts services, runs one spec

Specs covered

  • euclid-rules-builder
  • euclid-rules-lifecycle
  • euclid-rules-advanced
  • volume-split-page
  • dashboard-overview
  • auth-page
  • debit-routing-page
  • decision-explorer
  • payment-audit
  • analytics-page

Expected timing

  • Build: ~8-12 min
  • Each test job: ~8-12 min (parallel)
  • Total wall time: ~12-15 min

Part of the Cypress CI plan documented in

- Build Decision Engine once from PR source and share as artifact

- Run 10 Cypress spec files in parallel across matrix jobs

- Each job starts isolated stack with API + deps

- Upload screenshots on failure with 7-day retention
Copilot AI review requested due to automatic review settings April 27, 2026 13:35
Comment thread .github/workflows/cypress.yml Fixed
Comment thread .github/workflows/cypress.yml Fixed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a GitHub Actions workflow intended to run Cypress E2E tests in CI, and updates the dashboard’s Euclid rule builder UI plus Cypress specs to cover new/updated rule-building behaviors.

Changes:

  • Add a new .github/workflows/cypress.yml workflow that builds the Decision Engine Docker image once and runs Cypress specs in parallel via a matrix.
  • Extend/refresh the Euclid Rules UI (nested branches, multi-value enum operators, volume split outputs, gateway suggestions) and supporting CSS.
  • Replace the prior single Euclid rules UI spec with multiple focused Cypress UI specs and shared helper utilities.

Reviewed changes

Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
website/src/types/api.ts Adds rule_id? to RoutingAlgorithm to accommodate differing create vs list responses.
website/src/index.css Adds .cond-select styling for compact, consistent inline selects.
website/src/components/pages/EuclidRulesPage.tsx Major Euclid rule builder UX/feature expansion (multi-value enum operators, nested branches, volume-split outputs, suggestions).
cypress/support/euclid-helpers.js New shared Cypress helper functions for Euclid rules specs (scoping and common interactions).
cypress/e2e/ui/euclid-rules.cy.js Removes the old monolithic Euclid rules UI test.
cypress/e2e/ui/euclid-rules-lifecycle.cy.js Adds lifecycle coverage (create, activate/deactivate, view/hide JSON, summaries).
cypress/e2e/ui/euclid-rules-builder.cy.js Adds UI-only builder interaction coverage (conditions, OR groups, JSON preview, validation).
cypress/e2e/ui/euclid-rules-advanced.cy.js Adds advanced feature coverage (multi-value enums, nested branches, volume split + split+priority outputs, API assertions).
.github/workflows/cypress.yml Adds the parallelized Cypress CI workflow with Docker image artifact sharing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/cypress.yml Outdated
Comment thread .github/workflows/cypress.yml Outdated
Comment thread .github/workflows/cypress.yml Outdated
Comment thread .github/workflows/cypress.yml Outdated
Add explicit permissions block to address CodeQL security findings:

- contents: read (for checkout and file operations)

- actions: read (for artifact upload/download)
- Change health check from /health to /health/ready for proper readiness

- Add both website/package-lock.json and root package-lock.json to cache

- Configure preview.proxy in vite.config.ts for API routing

- Change VITE_API_BASE_URL to VITE_API_BASE_PATH for CI builds
- Use docker/build-push-action@v5 with GHA cache

- Enable BuildKit layer caching via cache-from/cache-to

- Optimize Dockerfile.postgres for dependency caching

- Cache Cargo dependencies before copying source code
Project doesn't use workspace structure with crates/ directory
- Remove double compilation (dummy + real build)

- Remove CARGO_INCREMENTAL=0 to enable incremental builds

- Docker layer caching via GHA is sufficient optimization
@jagan-jaya jagan-jaya changed the title ci: add Cypress E2E workflow fix(ci): add Cypress E2E workflow Apr 27, 2026
Comment thread .github/workflows/ci-pr.yml Dismissed
Comment thread .github/workflows/ci-pr.yml Dismissed
@jagan-jaya jagan-jaya self-assigned this Apr 28, 2026
@prajjwalkumar17 prajjwalkumar17 merged commit 72b2f78 into main Apr 29, 2026
12 checks passed
@prajjwalkumar17 prajjwalkumar17 deleted the feature/add-cypress-ci-workflow branch April 29, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants