-
Notifications
You must be signed in to change notification settings - Fork 3
Update config.yml #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe CircleCI config was updated to always run E2E tests (with master-branch filters), remove Slack failure notifications, rename the workflow to install-and-publish, add branch filters to publishing jobs, and expand the e2e job to check out a secondary repo on master and seed environment variables. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Push to repo
participant CircleCI as CircleCI Workflow
participant E2E as e2e-tests job
participant NPM as publish-npm-package
participant GH as publish-github-release
Note over Dev,CircleCI: Trigger on master branch only for gated jobs
Dev->>CircleCI: Commit pushed
alt branch == master
CircleCI->>E2E: Run testnet-e2e-tests
Note over E2E: Checkout e2e repo (master), seed env, run tests
E2E-->>CircleCI: Status
CircleCI->>NPM: Publish package (on success and filters)
NPM-->>CircleCI: Status
CircleCI->>GH: Create GitHub release (on success and filters)
GH-->>CircleCI: Status
else Non-master branch
Note over CircleCI: Non-filtered jobs skipped (e2e, publish)
end
Note right of CircleCI: Slack failure notifications removed
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches🧪 Generate unit tests
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 |
|
Yooo! You forgot to bump the version in package.json! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| sed -i.bak "s/private_key/$PRIVATE_KEY/g" .env | ||
| sed -i.bak "s/project_key/$PROJECT_KEY/g" .env | ||
| sed -i.bak "s/project_key_testnet/$PROJECT_KEY_TESTNET/g" .env | ||
| sed -i.bak "s/api_key/$API_KEY/g" .env | ||
| sed -i.bak "s/incorrect_api_key_arka/$INCORRECT_API_KEY_ARKA/g" .env | ||
| sed -i.bak "s/invalid_api_key_arka/$INVALID_API_KEY_ARKA/g" .env | ||
| sed -i.bak "s/bundler_api_key/$BUNDLER_API_KEY/g" .env | ||
| sed -i.bak "s/data_api_key/$DATA_API_KEY/g" .env | ||
| sed -i.bak "s/api_key_arka/$API_KEY_ARKA/g" .env | ||
| sed -i.bak "s/api_key_sessionkey/$API_KEY_SESSIONKEY/g" .env | ||
| sed -i.bak "s/primary_private_key/$PRIMARY_PRIVATE_KEY/g" .env | ||
| sed -i.bak "s/secondary_private_key/$SECONDARY_PRIVATE_KEY/g" .env | ||
| sed -i.bak "s/primary_wallet_address/$PRIMARY_WALLET_ADDRESS/g" .env | ||
| sed -i.bak "s/secondary_wallet_address/$SECONDARY_WALLET_ADDRESS/g" .env | ||
| sed -i.bak "s/paymaster_address/$PAYMASTER_ADDRESS/g" .env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use safe templating for .env secrets
These sed -i replacements break as soon as any secret contains / or & (common in Base64 or URL-style API keys), corrupting .env and failing the run. Switch to a tool that handles arbitrary values—e.g. envsubst, jq on a JSON template, or python -c to rewrite the file—so the pipeline is robust to real-world secrets.
🤖 Prompt for AI Agents
In .circleci/config.yml around lines 74 to 88 the series of sed -i replacements
are unsafe because sed delimiters break when secrets contain characters like /
or &, so replace this block with a safe templating step that consumes
environment variables and writes .env atomically (for example: use envsubst with
${VAR} placeholders after exporting the CI variables, or run a short Python
script that reads a .env.template and replaces placeholders using os.environ
then writes the output); ensure the chosen approach preserves all variable
values verbatim, handles missing variables explicitly, and writes the final .env
file without relying on sed in-place editing.
| filters: | ||
| branches: | ||
| only: | ||
| - master | ||
|
|
||
| - e2e-tests: | ||
| name: testnet-e2e-tests | ||
| context: general-vars | ||
| requires: | ||
| - install | ||
| # filters: | ||
| # branches: | ||
| # only: | ||
| # - master | ||
| filters: | ||
| branches: | ||
| only: | ||
| - master | ||
|
|
||
| - publish-npm-package: | ||
| context: general-vars | ||
| requires: | ||
| - e2e-tests | ||
| - testnet-e2e-tests | ||
| filters: | ||
| branches: | ||
| only: | ||
| - master | ||
| - master | ||
|
|
||
| - publish-github-release: | ||
| context: general-vars | ||
| requires: | ||
| - publish-npm-package | ||
| filters: | ||
| branches: | ||
| only: | ||
| - master | ||
| - master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Branch filters disable CI on non-master branches
All jobs now filter to master, so pushes/PRs on any other branch will execute no jobs and silently skip installs/tests/publishing. That removes CI coverage for feature branches and PR validation. Please drop these filters or move them to only the publishing steps so CI still runs on non-master refs.
🤖 Prompt for AI Agents
In .circleci/config.yml around lines 161 to 190 the branch filters restricting
all jobs to only the master branch cause CI to be disabled for non-master
branches; remove the shared "filters: branches: only: - master" blocks from the
common/job definitions so normal build/test jobs run on PRs and feature
branches, and instead apply branch-only filters only to the actual
publishing/deployment jobs (e.g., publish-npm-package and
publish-github-release) so publish steps remain master-only while installs/tests
remain enabled for all branches.
Description
Types of changes
What types of changes does your code introduce?
Further comments (optional)
Summary by CodeRabbit
Tests
Chores