Skip to content

feat: FM-949 Added e2e playwright automation to circle ci/cd pipeline#1992

Open
ashwinnair-chimple wants to merge 2 commits into
developfrom
FM-949
Open

feat: FM-949 Added e2e playwright automation to circle ci/cd pipeline#1992
ashwinnair-chimple wants to merge 2 commits into
developfrom
FM-949

Conversation

@ashwinnair-chimple

@ashwinnair-chimple ashwinnair-chimple commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Changes

  • Added e2e playwright automation to circle ci/cd pipeline

How to test

  • Run the ci pipeline and check if e2e runs after jest test

Ref: FM-949

Summary by CodeRabbit

  • New Features

    • Added automated end-to-end testing to the delivery pipeline.
    • Test reports are now uploaded for easier review after runs.
  • Bug Fixes

    • Deployments to all environments now wait for end-to-end tests to pass before continuing, helping prevent broken releases.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

CircleCI adds a new Playwright E2E job that runs tests, stores results, and uploads the Playwright report to S3. The deploy workflow then requires that E2E job before dev, test, release, and prod deployment jobs can run.

Changes

CircleCI E2E job and deployment gating

Layer / File(s) Summary
E2E job definition
.circleci/config.yml
A new Playwright-based e2e-tests job runs npm run test:e2e, stores test results, and syncs playwright-report to S3.
Deployment workflow requirements
.circleci/config.yml
The s3-deploy-workflow adds e2e-tests, and dev/test/release/prod deploy jobs now require it before proceeding.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Tests & Lint & Coverage ⚠️ Warning Only .circleci/config.yml changed; no tests were added/updated, lint results aren't shown, and Jest coverageThreshold is commented out. Add or update tests for the CI change, record lint in CI, and enforce/report coverage >=70 with an active tooling threshold.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding Playwright E2E automation to the CircleCI pipeline.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch FM-949

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.circleci/config.yml:
- Around line 109-118: The E2E report upload is missing AWS auth when the test
step fails because aws-cli/setup is currently placed after the test flow and
cannot use when: always. Move the aws-cli/setup orb invocation earlier in the
CircleCI job, before the npm run test:e2e step, so the AWS CLI credentials are
available regardless of test outcome; keep the Upload Playwright report to S3
run step as the always-executed step using those credentials.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 26858b95-e523-49d5-808e-fa92273c89b4

📥 Commits

Reviewing files that changed from the base of the PR and between 511e0ed and 5a2ece9.

📒 Files selected for processing (1)
  • .circleci/config.yml

Comment thread .circleci/config.yml
Comment on lines +109 to +118
- aws-cli/setup:
aws_access_key_id: $AWS_ACCESS_KEY
region: $AWS_DEFAULT_REGION
aws_secret_access_key: $AWS_SECRET_ACCESS_KEY
- run:
name: Upload Playwright report to S3
when: always
command: |
aws s3 sync playwright-report \
"s3://globallit-aws-s3-static-webapp-test-us-east-2/e2e-reports/${CIRCLE_BRANCH}/${CIRCLE_BUILD_NUM}/"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== .circleci/config.yml: relevant lines =="
nl -ba .circleci/config.yml | sed -n '90,145p'

echo
echo "== orb references =="
rg -n "circleci/aws-cli|aws-cli/setup|aws-context|e2e-tests|when: always|npm run test:e2e" .circleci/config.yml

echo
echo "== top of config for orb version pin =="
nl -ba .circleci/config.yml | sed -n '1,40p'

Repository: curiouslearning/FeedTheMonsterJS

Length of output: 253


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== .circleci/config.yml: relevant lines =="
awk 'NR>=90 && NR<=145 { printf "%5d  %s\n", NR, $0 }' .circleci/config.yml

echo
echo "== orb references =="
rg -n "circleci/aws-cli|aws-cli/setup|aws-context|e2e-tests|when: always|npm run test:e2e" .circleci/config.yml

echo
echo "== top of config for orb version pin =="
awk 'NR>=1 && NR<=40 { printf "%5d  %s\n", NR, $0 }' .circleci/config.yml

Repository: curiouslearning/FeedTheMonsterJS

Length of output: 4124


🌐 Web query:

CircleCI aws-cli orb setup command when parameter circleci/aws-cli@5.2.0 docs

💡 Result:

The aws-cli/setup command in the circleci/aws-cli orb (version 5.2.0 and later) is used to install the AWS CLI and configure authentication, either via environment variables or by assuming an IAM role using OIDC [1][2][3]. Key parameters for the aws-cli/setup command include: - role_arn: The Amazon Resource Name (ARN) of the role to assume [1][2]. - profile_name: The name of the AWS profile to configure (defaults to "default") [1][2]. - role_session_name: An identifier for the assumed role session [1]. - session_duration: The duration of the session in seconds (defaults to 3600) [1]. - region: The AWS region to configure (defaults to ${AWS_DEFAULT_REGION}) [1]. - set_aws_env_vars: A boolean to determine if AWS environment variables should be set (defaults to true) [1]. - version: Specifies the version of the AWS v2 CLI to install (defaults to "latest") [1]. Example Usage: To use the orb in your configuration, include it in the orbs section of your .circleci/config.yml file and invoke the setup command in your job steps [2][3]: version: 2.1 orbs: aws-cli: circleci/aws-cli@5.2.0 jobs: my-job: executor: aws-cli/default steps: - checkout - aws-cli/setup: role_arn: arn:aws:iam::123456789012:role/my-role profile_name: my-profile - run: name: Verify authentication command: aws sts get-caller-identity --profile my-profile For the most up-to-date parameter details and usage examples, refer to the official CircleCI Orb Registry page for the circleci/aws-cli orb [4][5]. Note that in version 5.x, some users have noted changes in how parameters and environment variables are handled compared to previous versions; if you encounter authentication issues, ensuring your profile configuration is explicit can help [6][7].

Citations:


🌐 Web query:

CircleCI config command step when always supported on orb command invocation

💡 Result:

In CircleCI, you cannot directly apply the when: always attribute to the invocation of an orb command in your config.yml file [1][2]. The when attribute is a property of individual steps (such as run), not the command invocation itself [3][2]. To achieve the behavior where an entire orb command runs regardless of the success or failure of previous steps, you must apply the when: always attribute to each individual step defined within the orb command [1]. If you are using a third-party orb, you cannot modify its internal steps. In such cases, if the orb author has not designed the command steps to be configurable or specifically set to when: always, you may be unable to force the desired behavior through standard configuration [1][2][4]. As a workaround when using an orb that lacks this support, users often: 1. Copy the source code of the orb command into their own local config.yml and modify the when attribute on the internal run steps [1]. 2. Create a feature request on the specific orb's repository, as this is a common request for operations like uploading logs or tearing down infrastructure [4].

Citations:


Move AWS setup before the E2E test step
aws-cli/setup is an orb command invocation, so when: always can’t be applied here. If npm run test:e2e fails, this step is skipped and the S3 upload loses the AWS CLI/auth it needs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.circleci/config.yml around lines 109 - 118, The E2E report upload is
missing AWS auth when the test step fails because aws-cli/setup is currently
placed after the test flow and cannot use when: always. Move the aws-cli/setup
orb invocation earlier in the CircleCI job, before the npm run test:e2e step, so
the AWS CLI credentials are available regardless of test outcome; keep the
Upload Playwright report to S3 run step as the always-executed step using those
credentials.

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.

2 participants