### What
Leverage yarn workspaces and Turborepo for integration-tests in order to accelerate development and reduce DevX complexity.
### Why
The current solution for running integration tests requires using `medusa-dev-cli` in order to publish packages to a local npm repository. The package where the command is executed will have its package.json altered for any known medusa dependency in order to install from the local npm. The process is taxing on the host machine resources and prevents rapid iterations when working with integration tests.
For more information, see documentation: f0cc1b324c/docs/content/usage/local-development.md (run-api-integration-tests)
### How
By declaring `integeration-tests/**/*` as a workspace, Turborepo can now be leveraged to build and run integration test as if there were packages. The build process will take care of interdependency between package in order to ensure local dependency are met.
In addition, within each integration-tests "packages", we can declare local dependencies as "*" which will translate to using the one that is part of the current build, regardless of the dependency's version number. No more fiddling with version numbers.
Github actions pertaining to integration-tests have been streamlined to use the new behavior.
The integration-tests packages have been marked as `private:true` in order to avoid publishing them to the public npm registry.
### Testing
```
cd root-of-medusajs-medusa-repo/
yarn install
yarn build
yarn test:integration:api
yarn test:integration:plugins
```
After a code change, `yarn build` must be run before re-running an integration test, which is the same procedure as for unit tests.
Resolves: CORE-845
**What**
Sometimes the some integration tests that are depending on external services are failing due to timeout.
One of the reason is that the health check is done every 10 sec with a timeout of 5sec, which can lead to long waiting time before continuing
FIXED CORE-326
* fix: caching deps + add true parallelization to integration tests api
* fix: github action
* chore: upgrade to yarn berry (#1762)
* init migration
* remove: yarn.lock from all pkgs
* fix: build script in pkgs
* adjust yarn config
* fix: yarn.lock and yarnrc.yml
* fix: github actions
* fix: wrong type
* fix (medusa-react): use dts-cli instead of tsdx
* fix: yarn.lock
* fix: yarn v
* fix: prepare script
* add: comment on why we need to downgrade yarn before medusa-dev
* chore: move to Turborepo (#1763)
* increase number of parallel nodes
* fix (medusa-fulfillment-webshipper): build script
* fix: use new version of medusa-dev
* fix: rename cache-bootstrap to cache-deps
* add initial testing files
* prepare for github
* remove empty files
* remove ids
* set user and password for postgres service
* remove node setup
* remove unused flag from yarn install
* correct medusajs package
* arguments for create-medusa project
* make create command into one line
* working directory update
* update workflow
* add build
* run scripts from medusa-cli
* move scripts to medusa-cli
* add install
* get server output
* rename build to install
* update login script to get feedback
* add arguments to login script
* add argument for directory to get-product
* pass cli-test to get-products script
* add wait command
* fix waiting
* update wait-for-server
* echo status
* update start testing
* refactor code into test-action
* add list config for testing
* include shell
* update get-products script
* test to see if action fails when given wrong input
* use custom action for testing devleopment server and extend waiting for server to spin up
* update actions
* remove cache version
* yarn and build in cli-test directory
* update core
* update working directories
* test working dir after cd up
* update
* fix directories
* update directories
* use setup server action
* invoke correct action
* test
* update cli action
* remove action
* test with medusa-dev
* remove medusa dev for now
* test
* include medusa-dev
* remove invalid medusa new command
* try moving project one dir up
* add silent to curl output from live server wait
* update seed data directory
* test
* remove sub workflow
* add matrix and postgres override for medusa-config
* fix matrix syntax
* add database url to job
* update yaml
* cli should fail on logging in
* create setup server action
* update test-server
* update scripts
* run scripts directory instead of cli scripts
* make directories current
* remove tests from cli
* run only on pr
* update name
* remove batch job model (for testing purposes)
* remove ls from test server action
* get content from develop
* undo changes to generate reference
* remove comments from scripts
* test failing command
* redo migrate command failing
* move scripts into interation tests
* Apply suggestions from code review
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>