TODO
These tests are for ensuring that the examples we are providing to users work right out of the box.
We guarantee that the examples work by running the lint
and build
tasks in each example and checking for a >>> FULL TURBO
on the second run. This requires that the tasks pass and are cacheable. The logic for the tests is in setup_example_test.sh
and takes a few steps:
cd
to the example directory.- Install packages.
- Run
turbo build lint
. - Run
turbo build lint
again and write the log results to a temporary text file. - Read that text file looking for a
>>> FULL TURBO
.
To create a test for a new example:
- Copy the
basic
directory into a new folder. - Edit the
name
field inpackage.json
. - Run
pnpm install
for the repository so the new package is added to the workspace. - Edit the
test
script to path to the directory you are interested in and use the package manager for that example. - Run
turbo test --filter="@turborepo-examples-tests/*"
in your terminal to make sure all is well!
We currently do not test the examples that use Docker. We may choose to do this in the future.