mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
End-to-end tests refactor (#10968)
* Refactor e2e tests * Only install root dependencies for lint step * Fix dumbest error ever * Pass process.env too to spawned subprocess * Suppress npm package installation prompt * Improve error handling * Add new compose file for tests * Avoid port conflict with remoted * Update docker-compose.yml * Add test docs * Use current branch workflow files and simplify skips * Fix workflow file * Fix workflow file * Try adding `.yml` extension to allow reference in `uses` * Place workflow file in folders to allow reference in `uses` * Requires more work than expected, reverting * Update docs to use correct compose file * Remove comment / unused code * Run tests from main Co-authored-by: ian <licitdev@gmail.com> Co-authored-by: Jay Cammarano <jay.cammarano@gmail.com> Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
@@ -138,3 +138,26 @@ introduction to [Contributing](/contributing/introduction).
|
||||
Check our Wiki for a [guide](https://github.com/directus/directus/wiki/debugging) on debugging the app and api.
|
||||
|
||||
:::
|
||||
|
||||
## 9. Running tests
|
||||
|
||||
Tests run automatically through GitHub Actions. However you may wish to run the tests locally especially when you write
|
||||
tests.
|
||||
|
||||
Install [Docker](https://docs.docker.com/get-docker/) and ensure that the service is running.
|
||||
|
||||
Navigate to the `tests` directory and run the following commands:
|
||||
|
||||
```bash
|
||||
# Ensure that you are testing on the lastest codebase
|
||||
npm run build
|
||||
|
||||
# Clean up in case you ran the tests before
|
||||
docker compose -f tests/docker-compose.yml down -v
|
||||
|
||||
# Start the necessary containers
|
||||
docker compose -f tests/docker-compose.yml up -d --wait
|
||||
|
||||
# Run the tests
|
||||
npm run test:e2e
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user