Skip to content

Commit 0ca8605

Browse files
authored
ci: Don't install dependencies in tests that don't need it (#11071)
### Description Seeing if we can cache dependencies for our integration test fixtures. Since we have to operate against real repos for these, we install their dependencies. But it looks like we were doing the dependency installation from scratch every time. Now, we just do it once and bring them back from disk. ### Testing Instructions CI
1 parent ff4c410 commit 0ca8605

File tree

16 files changed

+48
-15
lines changed

16 files changed

+48
-15
lines changed

turborepo-tests/integration/fixtures/basic_monorepo/package-lock.json

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

turborepo-tests/integration/fixtures/basic_monorepo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"scripts": {
44
"something": "turbo run build"
55
},
6-
"packageManager": "bower",
6+
"packageManager": "[email protected]",
77
"workspaces": [
88
"apps/**",
99
"packages/**"

turborepo-tests/integration/tests/command-bin.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Setup
2-
$ . ${TESTDIR}/../../helpers/setup_integration_test.sh
2+
$ . ${TESTDIR}/../../helpers/setup_integration_test.sh --no-install
33

44
$ ${TURBO} bin -vvv > out.log 2>&1
55
$ grep --quiet "Global turbo version: .*" out.log

turborepo-tests/integration/tests/command-ls.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Setup
2-
$ . ${TESTDIR}/../../helpers/setup_integration_test.sh
2+
$ . ${TESTDIR}/../../helpers/setup_integration_test.sh --no-install
33

44
Run info
55
$ ${TURBO} ls

turborepo-tests/integration/tests/config.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Setup
2-
$ . ${TESTDIR}/../../helpers/setup_integration_test.sh
2+
$ . ${TESTDIR}/../../helpers/setup_integration_test.sh --no-install
33

44
Run test run
55
$ ${TURBO} config

turborepo-tests/integration/tests/conflicting-flags.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Setup
2-
$ . ${TESTDIR}/../../helpers/setup_integration_test.sh
2+
$ . ${TESTDIR}/../../helpers/setup_integration_test.sh --no-install
33
$ ${TURBO} run build --daemon --no-daemon
44
ERROR the argument '--daemon' cannot be used with '--no-daemon'
55

turborepo-tests/integration/tests/dry-json/monorepo-no-changes.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Setup
2-
$ . ${TESTDIR}/../../../helpers/setup_integration_test.sh
2+
$ . ${TESTDIR}/../../../helpers/setup_integration_test.sh --no-install
33

44
# Save JSON to tmp file so we don't need to keep re-running the build
55
$ ${TURBO} run build --dry=json --filter='[main]' > tmpjson.log

turborepo-tests/integration/tests/dry-json/monorepo.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Setup
2-
$ . ${TESTDIR}/../../../helpers/setup_integration_test.sh
2+
$ . ${TESTDIR}/../../../helpers/setup_integration_test.sh --no-install
33

44
# Save JSON to tmp file so we don't need to keep re-running the build
55
$ ${TURBO} run build --dry=json > tmpjson.log

turborepo-tests/integration/tests/dry-json/single-package-no-change.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Setup
2-
$ . ${TESTDIR}/../../../helpers/setup_integration_test.sh single_package
2+
$ . ${TESTDIR}/../../../helpers/setup_integration_test.sh single_package --no-install
33

44
# Save JSON to tmp file so we don't need to keep re-running the build
55
$ ${TURBO} run build --dry=json --filter='[main]' > tmpjson.log

turborepo-tests/integration/tests/invalid-package-json.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Setup
2-
$ . ${TESTDIR}/../../helpers/setup_integration_test.sh
2+
$ . ${TESTDIR}/../../helpers/setup_integration_test.sh --no-install
33
Clear name field
44
$ jq '.name = ""' apps/my-app/package.json > package.json.new
55
$ mv apps/my-app/package.json apps/my-app/package.json.old

0 commit comments

Comments
 (0)