Skip to content

Commit

Permalink
ci(examples): update examples tests to diff full output
Browse files Browse the repository at this point in the history
This will help debug examples tests when they fail.
  • Loading branch information
mehulkar committed Jun 8, 2023
1 parent 4bfd3c4 commit 99f5ce4
Show file tree
Hide file tree
Showing 11 changed files with 297 additions and 21 deletions.
22 changes: 20 additions & 2 deletions turborepo-tests/examples/tests/npm-non-monorepo.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
$ . ${TESTDIR}/setup.sh non-monorepo npm
\d+\.\d+\.\d+ (re)

# run twice and make sure it works
$ npx turbo build lint > /dev/null 2>&1
$ npx turbo build lint > /dev/null 2>&1
$ 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)


$ 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
36 changes: 34 additions & 2 deletions turborepo-tests/examples/tests/npm-with-npm.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
$ . ${TESTDIR}/setup.sh with-npm npm
\d+\.\d+\.\d+ (re)

# run twice and make sure it works
$ npm run build lint > /dev/null 2>&1
$ npm run build lint > /dev/null 2>&1
$ 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)




$ 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
36 changes: 34 additions & 2 deletions turborepo-tests/examples/tests/npm-with-yarn.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
$ . ${TESTDIR}/setup.sh with-yarn npm
\d+\.\d+\.\d+ (re)

# run twice and make sure it works
$ npm run build lint > /dev/null 2>&1
$ npm run build lint > /dev/null 2>&1
$ 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)




$ 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
35 changes: 33 additions & 2 deletions turborepo-tests/examples/tests/pnpm-basic.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
$ . ${TESTDIR}/setup.sh basic pnpm
6.26.1
# run twice and make sure it works
$ pnpm run build lint > /dev/null 2>&1
$ pnpm run build lint > /dev/null 2>&1
$ pnpm run build lint -- --output-logs=none

\> @ build (.*)/pnpm-basic.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)




$ pnpm run build lint -- --output-logs=none

\> @ build (.*)/pnpm-basic.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
31 changes: 28 additions & 3 deletions turborepo-tests/examples/tests/pnpm-gatsby.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
$ . ${TESTDIR}/setup.sh with-gatsby pnpm
6.26.1
# run twice and make sure it works
$ pnpm run build lint > /dev/null 2>&1
$ pnpm run build lint > /dev/null 2>&1
$ git diff
$ pnpm run build lint -- --output-logs=none

\> with-gatsby@0.0.0 build (.*)/pnpm-gatsby.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)


$ pnpm run build lint -- --output-logs=none

\> with-gatsby@0.0.0 build (.*)/pnpm-gatsby.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)

35 changes: 33 additions & 2 deletions turborepo-tests/examples/tests/pnpm-kitchen-sink.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
$ . ${TESTDIR}/setup.sh kitchen-sink pnpm
6.26.1
# run twice and make sure it works
$ pnpm run build lint > /dev/null 2>&1
$ pnpm run build lint > /dev/null 2>&1
$ pnpm run build lint -- --output-logs=none

\> @ build (.*)/pnpm-kitchen-sink.t (re)
\> turbo build "lint" "--output-logs=none" (re)

\xe2\x80\xa2 Packages in scope: admin, api, blog, eslint-config-custom, eslint-config-custom-server, jest-presets, logger, storefront, tsconfig, ui (esc)
\xe2\x80\xa2 Running build, lint in 10 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)

Tasks: 11 successful, 11 total
Cached: 0 cached, 11 total
Time:\s*[\.0-9ms]+ (re)




$ pnpm run build lint -- --output-logs=none

\> @ build (.*)/pnpm-kitchen-sink.t (re)
\> turbo build "lint" "--output-logs=none" (re)

\xe2\x80\xa2 Packages in scope: admin, api, blog, eslint-config-custom, eslint-config-custom-server, jest-presets, logger, storefront, tsconfig, ui (esc)
\xe2\x80\xa2 Running build, lint in 10 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)

Tasks: 11 successful, 11 total
Cached: 11 cached, 11 total
Time:\s*[\.0-9ms]+ >>> FULL TURBO (re)




$ git diff
35 changes: 33 additions & 2 deletions turborepo-tests/examples/tests/pnpm-with-svelte.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
$ . ${TESTDIR}/setup.sh with-svelte pnpm
6.26.1
# run twice and make sure it works
$ pnpm run build lint > /dev/null 2>&1
$ pnpm run build lint > /dev/null 2>&1
$ pnpm run build lint -- --output-logs=none

\> @ build (.*)/pnpm-with-svelte.t (re)
\> turbo run build "lint" "--output-logs=none" (re)

\xe2\x80\xa2 Packages in scope: docs, eslint-config-custom, ui, web (esc)
\xe2\x80\xa2 Running build, lint in 4 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)

Tasks: 5 successful, 5 total
Cached: 0 cached, 5 total
Time:\s*[\.0-9ms]+ (re)




$ pnpm run build lint -- --output-logs=none

\> @ build (.*)/pnpm-with-svelte.t (re)
\> turbo run build "lint" "--output-logs=none" (re)

\xe2\x80\xa2 Packages in scope: docs, eslint-config-custom, ui, web (esc)
\xe2\x80\xa2 Running build, lint in 4 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
3 changes: 3 additions & 0 deletions turborepo-tests/examples/tests/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ PNPM_PACKAGE_MANAGER_VALUE="pnpm@6.26.1"
YARN_PACKAGE_MANAGER_VALUE="yarn@1.22.17"
if [ "$pkgManager" == "npm" ]; then
set_package_manager "$NPM_PACKAGE_MANAGER_VALUE"
npm --version
npm install > /dev/null
elif [ "$pkgManager" == "pnpm" ]; then
set_package_manager "$PNPM_PACKAGE_MANAGER_VALUE"
pnpm --version
pnpm install > /dev/null
elif [ "$pkgManager" == "yarn" ]; then
set_package_manager "$YARN_PACKAGE_MANAGER_VALUE"
yarn --version
yarn install > /dev/null
fi

Expand Down
27 changes: 25 additions & 2 deletions turborepo-tests/examples/tests/yarn-non-monorepo.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
$ . ${TESTDIR}/setup.sh non-monorepo yarn
1.22.17

# run twice and make sure it works
$ npx turbo build lint > /dev/null 2>&1
$ npx turbo build lint > /dev/null 2>&1
$ yarn turbo build lint --output-logs=none
yarn run v1.22.17
\$ (.*)node_modules/.bin/turbo build lint --output-logs=none (re)
\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)

Done in [\.0-9]+m?s\. (re)

$ yarn turbo build lint --output-logs=none
yarn run v1.22.17
\$ (.*)node_modules/.bin/turbo build lint --output-logs=none (re)
\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)

Done in [\.0-9]+m?s\. (re)
$ git diff
29 changes: 27 additions & 2 deletions turborepo-tests/examples/tests/yarn-with-npm.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
$ . ${TESTDIR}/setup.sh with-npm yarn
1.22.17

# run twice and make sure it works
$ yarn build lint > /dev/null 2>&1
$ yarn build lint > /dev/null 2>&1
$ yarn turbo build lint --output-logs=none
yarn run v1.22.17
\$ (.*)node_modules/.bin/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)

Done in [\.0-9]+m?s\. (re)

$ yarn turbo build lint --output-logs=none
yarn run v1.22.17
\$ (.*)node_modules/.bin/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)

Done in [\.0-9]+m?s\. (re)
$ git diff
29 changes: 27 additions & 2 deletions turborepo-tests/examples/tests/yarn-with-yarn.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
$ . ${TESTDIR}/setup.sh with-yarn yarn
1.22.17

# run twice and make sure it works
$ yarn turbo build lint > /dev/null 2>&1
$ yarn turbo build lint > /dev/null 2>&1
$ yarn turbo build lint --output-logs=none
yarn run v1.22.17
\$ (.*)node_modules/.bin/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)

Done in [\.0-9]+m?s\. (re)

$ yarn turbo build lint --output-logs=none
yarn run v1.22.17
\$ (.*)node_modules/.bin/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)

Done in [\.0-9]+m?s\. (re)
$ git diff

0 comments on commit 99f5ce4

Please sign in to comment.