Skip to content

feat: Add testing environment CI/CD workflows#356

Merged
dtrn2048 merged 4 commits intotestingfrom
feature/add-testing-workflows
Nov 11, 2025
Merged

feat: Add testing environment CI/CD workflows#356
dtrn2048 merged 4 commits intotestingfrom
feature/add-testing-workflows

Conversation

@dtrn2048
Copy link
Copy Markdown
Contributor

@dtrn2048 dtrn2048 commented Nov 11, 2025

Summary

Adds GitHub Actions workflows for the testing environment automation pipeline.

What's included

  • PR Validation Workflow ():

    • Runs linting (ruff check & format)
    • Type checking (mypy)
    • Unit tests
    • Validates Docker image builds
    • Auto-merges PR on success
  • Deployment Workflow ():

    • Builds and pushes Docker images with commit SHA tags
    • Updates echo-gitops repo with new image tag
    • Waits for ArgoCD deployment to be healthy
    • Runs smoke tests against deployed API
    • Runs Playwright E2E tests
    • Slack notifications (TODO: will be enabled once webhook is configured)

Testing

This PR will trigger the PR validation workflow. Once merged to testing branch, it will trigger the deployment workflow for the first time.

Related

  • Part of Phase 3 implementation from TESTING_STAGE_IMPLEMENTATION.md
  • Testing infrastructure already deployed in Phase 1 & 2
  • Testing branch already exists

Notes

  • Uses existing secrets: DO_REGISTRY_TOKEN, GITOPS_REPO_TOKEN
  • Slack notifications temporarily disabled until SLACK_WEBHOOK_URL secret is added

Note

Adds GitHub Actions to validate PRs to testing and to build, deploy, test, and notify for the testing environment.

  • Workflows:
    • /.github/workflows/deploy-testing.yml:
      • Builds and pushes Docker images for echo/server and echo/directus to DOCR with short SHA and testing tags.
      • Updates echo-gitops (helm/echo/values-testing.yaml) imageTag to the new SHA and pushes to main.
      • Waits for ArgoCD rollout by polling https://api.echo-testing.dembrane.com/health.
      • Runs smoke tests (pytest) and E2E tests (Playwright), uploads Playwright report artifact.
      • Sends Slack notification summarizing deployment, test results, and links.
    • /.github/workflows/pr-testing.yml:
      • Runs Ruff lint/format check, MyPy, and unit tests on PRs targeting testing.
      • Validates Docker builds (no push) for server and Directus images.
      • Auto-merges PRs on success using squash merge.

Written by Cursor Bugbot for commit 2ecd5de. This will update automatically on new commits. Configure here.

- Add PR validation workflow for testing branch
  - Runs linting, type checking, unit tests
  - Validates Docker builds
  - Auto-merges on success
- Add deployment workflow for testing environment
  - Builds and pushes images with commit SHA and 'testing' tags
  - Updates gitops repo with new image tag
  - Waits for ArgoCD deployment
  - Runs smoke tests and E2E tests
  - Sends Slack notifications with results
Will be enabled once SLACK_WEBHOOK_URL secret is configured
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 11, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/add-testing-workflows

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

SLACK_WEBHOOK_URL secret has been configured
@dtrn2048 dtrn2048 merged commit e8497c9 into testing Nov 11, 2025
2 of 5 checks passed
@dtrn2048 dtrn2048 deleted the feature/add-testing-workflows branch November 11, 2025 12:13
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Optional Notification Compromises Workflow Stability

The Slack notification step will fail when SLACK_WEBHOOK_URL secret is not configured, causing the entire workflow to fail even when all tests pass. The notify-slack job runs with if: always() but the notification step lacks a conditional check to skip execution when the webhook secret is missing. This contradicts the PR description stating notifications are "temporarily disabled until SLACK_WEBHOOK_URL secret is added."

Fix in Cursor Fix in Web


git add helm/echo/values-testing.yaml
git commit -m "Update testing image tag to ${{ needs.build-and-push.outputs.image-tag }}"
git push origin main
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: YAML Formatting Causes Commit Failure

The git commit command will fail if there are no changes to commit, which can occur if the sed command on line 80 doesn't match the expected pattern in values-testing.yaml. The sed pattern assumes imageTag: ".*" format with double quotes, but if the YAML uses a different format (single quotes, no quotes, or different spacing), no changes will be staged and the commit will fail with exit code 1, breaking the workflow.

Fix in Cursor Fix in Web

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.

1 participant