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

Loads global .env in vite.config to fix vscode extension #9884

Merged
merged 15 commits into from
Nov 19, 2024

Conversation

Rotorsoft
Copy link
Contributor

@Rotorsoft Rotorsoft commented Nov 12, 2024

Link to Issue

Closes: #9897

This is the configuration that worked for me locally and using the VSCode extension. I had to disable parallel execution for the extension to be able to run all tests at once. We should continue working on trying to parallelize all tests in the future.

Description of Changes

  • Calls dotenv.config() in vitest.confit.ts to fix vscode extension failing to load root .env
  • Removes unused env var INIT_TEST_DB
  • Passes import.meta to database bootstrapping utils to keep track of caller - just logging now, but can be useful
  • Removes vitest global setup. This is not needed since all seeders will bootstrap
  • Centralizes parallel files/concurrent behavior in vitest.config

"How We Fixed It"

Test Plan

  • Unit tested the FIXME() call.
  • CA (click around) tested on local and frack:
    • TODO page

Deployment Plan

Other Considerations

@Rotorsoft Rotorsoft requested a review from timolegros November 12, 2024 18:10
@github-actions github-actions bot marked this pull request as draft November 12, 2024 18:10
timolegros
timolegros previously approved these changes Nov 13, 2024
@Rotorsoft Rotorsoft marked this pull request as ready for review November 13, 2024 17:50
vite.config.ts Outdated Show resolved Hide resolved
@timolegros timolegros dismissed their stale review November 14, 2024 09:46

Significant changes

vite.config.ts Outdated Show resolved Hide resolved
@Rotorsoft Rotorsoft requested a review from timolegros November 14, 2024 14:01
@Rotorsoft
Copy link
Contributor Author

Yes @timolegros, I'm using this opportunity to remove unused variables and simplify bootstrapping and configuration. Next step is to work on test parallelization (future PR)

@Rotorsoft Rotorsoft merged commit 1ba693b into master Nov 19, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix vitest config to load root .env variables
4 participants