-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: make every examples test a workspace
This setup will allow turbo to parallelize and cache execution of these tests. It also reduces the number of Github Workflow runs that are triggered when an example changes, greatly reducing the amount of computing power required to run the tests. This commit does not change the fact that all examples tests are run when any of the examples change. We may be able to wire up dependencies more carefully in the future, but this is not feasible at the moment because each example itself is not a workspace.
- Loading branch information
Showing
43 changed files
with
590 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "@turborepo-examples-tests/helpers", | ||
"scripts": { | ||
"setup": "./setup_prysk.sh" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
BASE_DIR="$PWD/.." | ||
|
||
echo "basedir: $BASE_DIR" | ||
|
||
if [ -f "$BASE_DIR/.cram_env/bin/prysk" ]; then | ||
echo "Skipping prysk setup, prysk and venv already exists" | ||
else | ||
python3 -m venv "$BASE_DIR/.cram_env" | ||
"$BASE_DIR/.cram_env/bin/python3" -m pip install --quiet --upgrade pip | ||
"$BASE_DIR/.cram_env/bin/pip" install "prysk==0.15.0" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": ["//"], | ||
"pipeline": { | ||
"setup": { | ||
"cache": false | ||
}, | ||
"topo": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "@turborepo-examples-tests/npm-non-monorepo", | ||
"scripts": { | ||
"example-test": "../.cram_env/bin/prysk --shell=`which bash` test.t" | ||
}, | ||
"dependencies": { | ||
"turborepo-tests-helpers": "workspace:*", | ||
"@turborepo-examples-tests/helpers": "workspace:*", | ||
"turborepo-examples": "workspace:*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
$ . ${TESTDIR}/../setup.sh non-monorepo npm | ||
8\.\d+\.\d (re) | ||
# run twice and make sure it works | ||
$ TURBO_TEAM="" TURBO_REMOTE_ONLY=false npx turbo build lint --output-logs=none | ||
\xe2\x80\xa2 Running build, lint (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
|
||
Tasks: 2 successful, 2 total | ||
Cached: 0 cached, 2 total | ||
Time:\s*[\.0-9ms]+ (re) | ||
|
||
$ TURBO_TEAM="" TURBO_REMOTE_ONLY=false npx turbo build lint --output-logs=none | ||
\xe2\x80\xa2 Running build, lint (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
|
||
Tasks: 2 successful, 2 total | ||
Cached: 2 cached, 2 total | ||
Time:\s*[\.0-9ms]+ >>> FULL TURBO (re) | ||
|
||
$ git diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "@turborepo-examples-tests/npm-with-npm", | ||
"scripts": { | ||
"example-test": "../.cram_env/bin/prysk --shell=`which bash` test.t" | ||
}, | ||
"dependencies": { | ||
"turborepo-tests-helpers": "workspace:*", | ||
"@turborepo-examples-tests/helpers": "workspace:*", | ||
"turborepo-examples": "workspace:*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
$ . ${TESTDIR}/../setup.sh with-npm npm | ||
8\.\d+\.\d (re) | ||
# run twice and make sure it works | ||
$ TURBO_TEAM="" TURBO_REMOTE_ONLY=false npm run build lint -- --output-logs=none | ||
|
||
\> build (re) | ||
\> turbo run build lint --output-logs=none (re) | ||
|
||
\xe2\x80\xa2 Packages in scope: docs, eslint-config-custom, tsconfig, ui, web (esc) | ||
\xe2\x80\xa2 Running build, lint in 5 packages (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
|
||
Tasks: 5 successful, 5 total | ||
Cached: 0 cached, 5 total | ||
Time:\s*[\.0-9ms]+ (re) | ||
|
||
$ TURBO_TEAM="" TURBO_REMOTE_ONLY=false npm run build lint -- --output-logs=none | ||
|
||
\> build (re) | ||
\> turbo run build lint --output-logs=none (re) | ||
|
||
\xe2\x80\xa2 Packages in scope: docs, eslint-config-custom, tsconfig, ui, web (esc) | ||
\xe2\x80\xa2 Running build, lint in 5 packages (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
|
||
Tasks: 5 successful, 5 total | ||
Cached: 5 cached, 5 total | ||
Time:\s*[\.0-9ms]+ >>> FULL TURBO (re) | ||
|
||
$ git diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "@turborepo-examples-tests/npm-with-yarn", | ||
"scripts": { | ||
"example-test": "../.cram_env/bin/prysk --shell=`which bash` test.t" | ||
}, | ||
"dependencies": { | ||
"turborepo-tests-helpers": "workspace:*", | ||
"@turborepo-examples-tests/helpers": "workspace:*", | ||
"turborepo-examples": "workspace:*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
$ . ${TESTDIR}/../setup.sh with-yarn npm | ||
8\.\d+\.\d (re) | ||
# run twice and make sure it works | ||
$ TURBO_TEAM="" TURBO_REMOTE_ONLY=false npm run build lint -- --output-logs=none | ||
|
||
\> build (re) | ||
\> turbo build lint --output-logs=none (re) | ||
|
||
\xe2\x80\xa2 Packages in scope: docs, eslint-config-custom, tsconfig, ui, web (esc) | ||
\xe2\x80\xa2 Running build, lint in 5 packages (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
|
||
Tasks: 5 successful, 5 total | ||
Cached: 0 cached, 5 total | ||
Time:\s*[\.0-9ms]+ (re) | ||
|
||
$ TURBO_TEAM="" TURBO_REMOTE_ONLY=false npm run build lint -- --output-logs=none | ||
|
||
\> build (re) | ||
\> turbo build lint --output-logs=none (re) | ||
|
||
\xe2\x80\xa2 Packages in scope: docs, eslint-config-custom, tsconfig, ui, web (esc) | ||
\xe2\x80\xa2 Running build, lint in 5 packages (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
|
||
Tasks: 5 successful, 5 total | ||
Cached: 5 cached, 5 total | ||
Time:\s*[\.0-9ms]+ >>> FULL TURBO (re) | ||
|
||
$ git diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "@turborepo-examples-tests/pnpm-basic", | ||
"scripts": { | ||
"example-test": "../.cram_env/bin/prysk --shell=`which bash` test.t" | ||
}, | ||
"dependencies": { | ||
"turborepo-tests-helpers": "workspace:*", | ||
"@turborepo-examples-tests/helpers": "workspace:*", | ||
"turborepo-examples": "workspace:*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
$ . ${TESTDIR}/../setup.sh basic pnpm | ||
6.26.1 | ||
# run twice and make sure it works | ||
$ TURBO_TEAM="" TURBO_REMOTE_ONLY=false pnpm run build lint -- --output-logs=none | ||
|
||
\> @ build (.*)/test.t (re) | ||
\> turbo run build "lint" "--output-logs=none" (re) | ||
|
||
\xe2\x80\xa2 Packages in scope: docs, eslint-config-custom, tsconfig, ui, web (esc) | ||
\xe2\x80\xa2 Running build, lint in 5 packages (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
|
||
Tasks: 5 successful, 5 total | ||
Cached: 0 cached, 5 total | ||
Time:\s*[\.0-9ms]+ (re) | ||
|
||
$ TURBO_TEAM="" TURBO_REMOTE_ONLY=false pnpm run build lint -- --output-logs=none | ||
|
||
\> @ build (.*)/test.t (re) | ||
\> turbo run build "lint" "--output-logs=none" (re) | ||
|
||
\xe2\x80\xa2 Packages in scope: docs, eslint-config-custom, tsconfig, ui, web (esc) | ||
\xe2\x80\xa2 Running build, lint in 5 packages (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
|
||
Tasks: 5 successful, 5 total | ||
Cached: 5 cached, 5 total | ||
Time:\s*[\.0-9ms]+ >>> FULL TURBO (re) | ||
|
||
$ git diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "@turborepo-examples-tests/pnpm-gatsby", | ||
"scripts": { | ||
"example-test": "../.cram_env/bin/prysk --shell=`which bash` test.t" | ||
}, | ||
"dependencies": { | ||
"turborepo-tests-helpers": "workspace:*", | ||
"@turborepo-examples-tests/helpers": "workspace:*", | ||
"turborepo-examples": "workspace:*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
$ . ${TESTDIR}/../setup.sh with-gatsby pnpm | ||
6.26.1 | ||
# run twice and make sure it works | ||
$ TURBO_TEAM="" TURBO_REMOTE_ONLY=false pnpm run build lint -- --output-logs=none | ||
|
||
\> with-gatsby@0.0.0 build (.*)/test.t (re) | ||
\> turbo build "lint" "--output-logs=none" (re) | ||
|
||
\xe2\x80\xa2 Packages in scope: docs, eslint-config-custom, tsconfig, ui, web (esc) | ||
\xe2\x80\xa2 Running build, lint in 5 packages (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
|
||
Tasks: 5 successful, 5 total | ||
Cached: 0 cached, 5 total | ||
Time:\s*[\.0-9ms]+ (re) | ||
|
||
$ TURBO_TEAM="" TURBO_REMOTE_ONLY=false pnpm run build lint -- --output-logs=none | ||
|
||
\> with-gatsby@0.0.0 build (.*)/test.t (re) | ||
\> turbo build "lint" "--output-logs=none" (re) | ||
|
||
\xe2\x80\xa2 Packages in scope: docs, eslint-config-custom, tsconfig, ui, web (esc) | ||
\xe2\x80\xa2 Running build, lint in 5 packages (esc) | ||
\xe2\x80\xa2 Remote caching disabled (esc) | ||
|
||
Tasks: 5 successful, 5 total | ||
Cached: 3 cached, 5 total | ||
Time:\s*[\.0-9ms]+ (re) | ||
|
||
$ git diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "@turborepo-examples-tests/pnpm-kitchen-sink", | ||
"scripts": { | ||
"example-test": "../.cram_env/bin/prysk --shell=`which bash` test.t" | ||
}, | ||
"dependencies": { | ||
"turborepo-tests-helpers": "workspace:*", | ||
"@turborepo-examples-tests/helpers": "workspace:*", | ||
"turborepo-examples": "workspace:*" | ||
} | ||
} |
Oops, something went wrong.