File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 1818
1919$pnpm_cmd run check-types
2020
21- # Load .env.local if it exists
21+ # Use dotenvx to securely load .env.local and run commands that depend on it
2222if [ -f ".env.local" ]; then
23- export $(grep -v '^#' .env.local | xargs)
24- fi
25-
26- # Run tests if RUN_TESTS_ON_PUSH is set to true
27- if [ "$RUN_TESTS_ON_PUSH" = "true" ]; then
28- $pnpm_cmd run test
23+ # Check if RUN_TESTS_ON_PUSH is set to true and run tests with dotenvx
24+ if npx dotenvx get RUN_TESTS_ON_PUSH -f .env.local 2>/dev/null | grep -q "^true$"; then
25+ npx dotenvx run -f .env.local -- $pnpm_cmd run test
26+ fi
27+ else
28+ # Fallback: run tests if RUN_TESTS_ON_PUSH is set in regular environment
29+ if [ "$RUN_TESTS_ON_PUSH" = "true" ]; then
30+ $pnpm_cmd run test
31+ fi
2932fi
3033
3134# Check for new changesets.
You can’t perform that action at this time.
0 commit comments