Conversation
WalkthroughUpdates CircleCI e2e jobs by removing a diagnostic cypress config print and extending .env substitutions with seven additional variables in both e2e-tests and e2e-playwright steps. Changes
Sequence Diagram(s)sequenceDiagram
participant CircleCI
participant e2e-tests
participant e2e-playwright
participant Env as .env
participant Runner as Test Runner
Note over CircleCI: Workflow triggers e2e jobs
CircleCI->>e2e-tests: Start job
e2e-tests->>Env: Write substitutions (existing + DEBUG, CI, HEADED, SUSHI_URL, STAGING_URL, TESTMAIL_USERNAME, TESTMAIL_EMAIL)
Note right of e2e-tests: Removed diagnostic cat of cypress.config.js
e2e-tests->>Runner: Execute Cypress tests
CircleCI->>e2e-playwright: Start job
e2e-playwright->>Env: Write same substitutions
Note right of e2e-playwright: Removed diagnostic cat of cypress.config.js
e2e-playwright->>Runner: Execute Playwright tests
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (6)
.circleci/config.yml (6)
142-148: Harden sed replacements (escape &, |, backslashes) to avoid mangled values; also DRY these 7 lines.If any value contains &, |, or backslashes (URLs, emails, debug strings), sed will corrupt the replacement. Escape before substituting, or values like SUSHI_URL may break. Also, consider a tiny helper to reduce duplication.
Apply this diff:
- sed -i "s|debug_value|$DEBUG|g" .env - sed -i "s|ci_value|$CI|g" .env - sed -i "s|headed_value|$HEADED|g" .env - sed -i "s|sushi_url_value|$SUSHI_URL|g" .env - sed -i "s|staging_url_value|$STAGING_URL|g" .env - sed -i "s|testmail_username_value|$TESTMAIL_USERNAME|g" .env - sed -i "s|testmail_email_value|$TESTMAIL_EMAIL|g" .env + esc() { v="$1"; v="${v//\\/\\\\}"; v="${v//&/\\&}"; v="${v//|/\\|}"; printf '%s' "$v"; } + sed -i "s|debug_value|$(esc "$DEBUG")|g" .env + sed -i "s|ci_value|$(esc "$CI")|g" .env + sed -i "s|headed_value|$(esc "$HEADED")|g" .env + sed -i "s|sushi_url_value|$(esc "$SUSHI_URL")|g" .env + sed -i "s|staging_url_value|$(esc "$STAGING_URL")|g" .env + sed -i "s|testmail_username_value|$(esc "$TESTMAIL_USERNAME")|g" .env + sed -i "s|testmail_email_value|$(esc "$TESTMAIL_EMAIL")|g" .env
150-151: Install Playwright system deps to avoid runtime browser issues.Using the Cypress image, Playwright may miss OS libs. Add --with-deps for parity with the e2e-tests job.
- npx playwright install + npx playwright install --with-deps
168-171: Avoid network flakiness: read mochawesome.json locally instead of wget from artifacts.You already have the report at /tmp. Downloading it back via artifacts is brittle and slower.
- wget https://output.circle-artifacts.com/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/${CIRCLE_NODE_INDEX}/tmp/mochawesome-report/mochawesome.json - - MOCHAWESOME_JSON_FILE=./mochawesome.json + MOCHAWESOME_JSON_FILE=/tmp/mochawesome-report/mochawesome.json
128-149: Fail fast and validate required envs before substitution.Guard against unset vars silently producing empty values; fail early for missing inputs.
command: | + set -Eeuo pipefail + # Ensure required env vars are provided + : "${DEBUG?}" "${CI?}" "${HEADED?}" "${SUSHI_URL?}" "${STAGING_URL?}" "${TESTMAIL_USERNAME?}" "${TESTMAIL_EMAIL?}" cd ~ git clone -b pillarx-playwright --single-branch https://$GITHUB_TOKEN@github.com/pillarwallet/x-e2e.git cd x-e2e git pull sed -i "s|base_url_value|$BASE_URL|g" .envAlso confirm the .env template actually uses the exact placeholders you’re substituting (e.g., testmail_* vs test_mail_* names). If helpful, add a quick validation:
grep -nE '_value' .env || trueExpected: no matches.
128-131: Token-in-URL clone: confirm masking; consider safer patterns.Cloning with https://$GITHUB_TOKEN@... can leak in logs if masking fails. Verify CircleCI masking is enabled for GITHUB_TOKEN. Optionally switch to oauth2 username to avoid special-char pitfalls:
- git clone -b pillarx-playwright --single-branch https://$GITHUB_TOKEN@github.com/pillarwallet/x-e2e.git + git clone -b pillarx-playwright --single-branch https://oauth2:${GITHUB_TOKEN}@github.com/pillarwallet/x-e2e.gitYou can also drop the redundant git pull after a fresh clone.
114-116: Image choice for Playwright job.Using the heavy Cypress image for Playwright increases cold start and apt footprint. Consider a Playwright base (e.g., mcr.microsoft/playwright) to remove the need for installing deps and speed up runs.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.circleci/config.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: lint
- GitHub Check: unit-tests
adding playwrite along other test cases
Summary by CodeRabbit