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

Support for direnv and use CARE_API from env in vite config #6201

Merged
merged 6 commits into from
Sep 5, 2023
Merged
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
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test -f .env.local && dotenv .env.local
4 changes: 1 addition & 3 deletions .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ jobs:
- name: Check care is up ♻
run: curl -o /dev/null -s -w "%{http_code}\n" http://localhost:9000

- name: Change api proxy url 📝
run: 'sed --in-place "s^target: .*,^target: \"http://localhost:9000\",^g" vite.config.ts'

- name: Install dependencies 📦
run: npm install

Expand All @@ -55,6 +52,7 @@ jobs:
browser: chrome
record: true
env:
CARE_API: http://localhost:9000
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_OPTIONS: --max_old_space_size=4096
Expand Down
4 changes: 2 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default defineConfig({
port: 4000,
proxy: {
"/api": {
target: "https://careapi.ohc.network",
target: process.env.CARE_API ?? "https://careapi.ohc.network",
sainak marked this conversation as resolved.
Show resolved Hide resolved
changeOrigin: true,
},
},
Expand All @@ -93,7 +93,7 @@ export default defineConfig({
port: 4000,
proxy: {
"/api": {
target: "https://careapi.ohc.network",
target: process.env.CARE_API ?? "https://careapi.ohc.network",
changeOrigin: true,
},
},
Expand Down
Loading