Skip to content
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

Remove dotenv and use node --env-file command #1543

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,4 @@ jobs:
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Build
env:
CI: false
run: yarn build
14 changes: 8 additions & 6 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@ jobs:
- name: Install dependencies
run: yarn

- name: Set values in .env
run: |
echo "TENDERLY_ACCOUNT=bancor" >> .env
echo "TENDERLY_PROJECT=carbon-test-forks" >> .env
echo "TENDERLY_ACCESS_KEY=${{ secrets.VITE_TENDERLY_ACCESS_KEY }}" >> .env
echo "CI=true" >> .env
echo "DRAFT=${{ github.event.pull_request.draft || github.base_ref != 'main' }}" >> .env

- name: Install Playwright browsers and run Playwright tests
run: yarn e2e
env:
TENDERLY_ACCOUNT: bancor
TENDERLY_PROJECT: carbon-test-forks
TENDERLY_ACCESS_KEY: ${{ secrets.VITE_TENDERLY_ACCESS_KEY }}
CI: true
DRAFT: ${{ github.event.pull_request.draft || github.base_ref != 'main' }}

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"date-fns": "^3.3.1",
"dayjs": "^1.11.7",
"decimal.js": "^10.4.2",
"dotenv": "^16.3.1",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-react-app": "^7.0.1",
Expand Down Expand Up @@ -106,7 +105,7 @@
"test": "vitest run --mode production",
"coverage": "yarn test --coverage",
"pree2e": "yarn playwright install --with-deps chromium",
"e2e": "playwright test",
"e2e": "node --env-file=.env node_modules/.bin/playwright test",
"lint": "eslint --ext .tsx,.ts .",
"pre-commit": "yarn lint-staged",
"e2e:report": "npx playwright show-report e2e/playwright-report",
Expand Down
1 change: 0 additions & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { defineConfig, devices } from '@playwright/test';
import 'dotenv/config'; // TODO: we can remove this with [email protected]

const isCI = !!process.env.CI && process.env.CI !== 'false';

Expand Down