-
Notifications
You must be signed in to change notification settings - Fork 36
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
chore: dotenv integrations update #538
Conversation
- Updated `package.json`: - Added `dotenv` library (`^16.4.7`) as a new dependency. This enables the use of environment variables to enhance configuration management and improve project flexibility.
- `.env.vault`: Updated secrets and versions for `development`, `ci`, and `staging` environments. - `DOTENV_VAULT_DEVELOPMENT`: Replaced secret and updated to version 2. - `DOTENV_VAULT_CI`: Replaced secret and updated to version 3. - `DOTENV_VAULT_STAGING`: Replaced secret and updated to version 2.
- Updated `finance-earn-tokens.tsx` to use `EARN_TOKEN_SERVICE_URL` from `GLOBAL_CONSTANTS` instead of hardcoding the URL. - Added `EARN_TOKEN_SERVICE_URL` constant definition in `config-global.ts` with fallback to environment variables. This ensures better maintainability and configuration flexibility.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #538 +/- ##
========================================
+ Coverage 0.03% 8.30% +8.26%
========================================
Files 557 558 +1
Lines 30734 30752 +18
Branches 557 618 +61
========================================
+ Hits 11 2553 +2542
+ Misses 30167 27729 -2438
+ Partials 556 470 -86 ☔ View full report in Codecov by Sentry. |
- Create `src/test/config-global.test.ts` to validate the presence of critical properties in `GLOBAL_CONSTANTS`. - Ensure all required properties, such as `MMC_ADDRESS`, `EMAIL_API_KEY`, and `BASE_URL`, are defined.
- Export `FinanceEarnTokensProps` for external usage in other modules/files. - Add `data-testid="earn-tokens-image"` to the relevant `Stack` component for improved testability in `finance-earn-tokens.tsx`.
- Updated `setupTest.ts` to include `vi` from `vitest` and mock `react-i18next`. - Added a `__mocks__/react-i18next.js` file to mock `useTranslation`, providing basic functionality for `t` and `i18n`. This ensures compatibility in tests that rely on i18n translations.
- Created `finance-earn-token.test.tsx` to cover functionality. - Verified snapshot rendering for consistent UI structure. - Tested presence and correctness of title, subtitle, and description. - Ensured button click triggers `window.open` with expected URL. - Confirmed image visibility on large screens.
|
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.
LGTM
This pull request includes various updates and improvements across multiple files, focusing on configuration changes, dependency updates, and enhancements to the codebase. The most important changes include updates to environment variables, workflow adjustments, and the addition of a code coverage badge.
Environment and configuration updates:
.env.vault
: Updated the development, CI, staging, and production vault keys and their respective versions.Workflow adjustments:
.github/workflows/ci.yml
: Removed the build analysis step from the CI workflow..github/workflows/release.yml
: Renamed the release job to "Semver Release" for clarity.Dependency updates:
package.json
: Added thedotenv
package as a new dependency.Documentation and testing improvements:
README.md
: Added a Codecov badge to the README file to display code coverage status.setupTest.ts
: Added a mock for thereact-i18next
module to improve testing.This pull request includes multiple changes across various files to update environment variables, improve CI workflows, add a badge to the README, and update dependencies.Environment Variables:
DOTENV_VAULT_DEVELOPMENT
,DOTENV_VAULT_CI
,DOTENV_VAULT_STAGING
,DOTENV_VAULT_PRODUCTION
and their versions in.env.vault
.CI Workflow Improvements:
.github/workflows/ci.yml
..github/workflows/release.yml
.Documentation:
README.md
file.Dependencies:
dotenv
package topackage.json
.Codebase Updates:
handleClick
function insrc/sections/finance/components/finance-earn-tokens.tsx
and added a TODO comment to move it to environment variables.codecovVitePlugin
configuration invite.config.ts
after thenodePolyfills
plugin.