Skip to content

Commit

Permalink
chore: bump integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-olszewski committed May 29, 2024
1 parent 3246551 commit 986d423
Show file tree
Hide file tree
Showing 46 changed files with 160 additions and 156 deletions.
5 changes: 3 additions & 2 deletions turborepo-tests/integration/tests/dry-json/monorepo.t
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Setup
"foo.txt": "eebae5f3ca7b5831e429e947b7d61edd0de69236"
},
"hashOfExternalDependencies": "459c029558afe716",
"hashOfInternalDependencies": "",
"environmentVariables": {
"specified": {
"env": [
Expand Down Expand Up @@ -50,7 +51,7 @@ Setup
"taskId": "my-app#build",
"task": "build",
"package": "my-app",
"hash": "4dc68e628703cbf4",
"hash": "0555ce94ca234049",
"inputs": {
".env.local": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
"package.json": "1746e0db2361085b5953a6a3beab08c24af5bc08"
Expand Down Expand Up @@ -110,7 +111,7 @@ Setup
"taskId": "util#build",
"task": "build",
"package": "util",
"hash": "728076a89c49afbf",
"hash": "bf1798d3e46e1b48",
"inputs": {
"package.json": "e755064fd7893809d10fc067bb409c7ae516327f"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Setup
"package.json": "8606ff4b95a5330740d8d9d0948faeada64f1f32"
},
"hashOfExternalDependencies": "",
"hashOfInternalDependencies": "",
"environmentVariables": {
"specified": {
"env": [],
Expand All @@ -33,7 +34,7 @@ Setup
{
"taskId": "build",
"task": "build",
"hash": "5c3c1742edb70bb8",
"hash": "e2b99dad85a4ff66",
"inputs": {
".gitignore": "03b541460c1b836f96f9c0a941ceb48e91a9fd83",
"package-lock.json": "1c117cce37347befafe3a9cba1b8a609b3600021",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Setup
"somefile.txt": "45b983be36b73c0788dc9cbcb76cbb80fc7bb057"
},
"hashOfExternalDependencies": "",
"hashOfInternalDependencies": "",
"environmentVariables": {
"specified": {
"env": [],
Expand All @@ -32,7 +33,7 @@ Setup
{
"taskId": "build",
"task": "build",
"hash": "6c1cecf7f99d0166",
"hash": "7ece7b62aad25615",
"inputs": {
".gitignore": "03b541460c1b836f96f9c0a941ceb48e91a9fd83",
"package-lock.json": "1c117cce37347befafe3a9cba1b8a609b3600021",
Expand Down Expand Up @@ -87,7 +88,7 @@ Setup
{
"taskId": "test",
"task": "test",
"hash": "d241ae86a1a24a2e",
"hash": "cb5839f7284aa5f3",
"inputs": {
".gitignore": "03b541460c1b836f96f9c0a941ceb48e91a9fd83",
"package-lock.json": "1c117cce37347befafe3a9cba1b8a609b3600021",
Expand Down
3 changes: 2 additions & 1 deletion turborepo-tests/integration/tests/dry-json/single-package.t
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Setup
"somefile.txt": "45b983be36b73c0788dc9cbcb76cbb80fc7bb057"
},
"hashOfExternalDependencies": "",
"hashOfInternalDependencies": "",
"environmentVariables": {
"specified": {
"env": [],
Expand All @@ -32,7 +33,7 @@ Setup
{
"taskId": "build",
"task": "build",
"hash": "6c1cecf7f99d0166",
"hash": "7ece7b62aad25615",
"inputs": {
".gitignore": "03b541460c1b836f96f9c0a941ceb48e91a9fd83",
"package-lock.json": "1c117cce37347befafe3a9cba1b8a609b3600021",
Expand Down
6 changes: 3 additions & 3 deletions turborepo-tests/integration/tests/dry-run.t
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Setup
Global Hash Inputs
Global Files = 1
External Dependencies Hash = 459c029558afe716
Global Cache Key = HEY STELLLLLLLAAAAAAAAAAAAA
Global Cache Key = I can\xe2\x80\x99t see ya, but I know you\xe2\x80\x99re here (esc)
Global Env Vars = SOME_ENV_VAR
Global Env Vars Values =
Inferred Global Env Vars Values =
Expand All @@ -31,7 +31,7 @@ Setup
my-app#build
Task = build\s* (re)
Package = my-app\s* (re)
Hash = 4dc68e628703cbf4
Hash = 0555ce94ca234049
Cached \(Local\) = false\s* (re)
Cached \(Remote\) = false\s* (re)
Directory = apps(\/|\\)my-app\s* (re)
Expand All @@ -51,7 +51,7 @@ Setup
util#build
Task = build\s* (re)
Package = util\s* (re)
Hash = 728076a89c49afbf
Hash = bf1798d3e46e1b48
Cached \(Local\) = false\s* (re)
Cached \(Remote\) = false\s* (re)
Directory = packages(\/|\\)util\s* (re)
Expand Down
30 changes: 15 additions & 15 deletions turborepo-tests/integration/tests/edit-turbo-json/task.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,63 +6,63 @@ Baseline task hashes
$ ${TURBO} build --dry=json | jq -r '.tasks | sort_by(.taskId)[] | {taskId, hash}'
{
"taskId": "another#build",
"hash": "90d25abdd579d2bf"
"hash": "3639431fdcdf9f9e"
}
{
"taskId": "my-app#build",
"hash": "4dc68e628703cbf4"
"hash": "0555ce94ca234049"
}
{
"taskId": "util#build",
"hash": "728076a89c49afbf"
"hash": "bf1798d3e46e1b48"
}

Change only my-app#build
$ cp "$TESTDIR/fixture-configs/b-change-only-my-app.json" "$(pwd)/turbo.json" && git commit -am "no comment" --quiet
$ ${TURBO} build --dry=json | jq -r '.tasks | sort_by(.taskId)[] | {taskId, hash}'
{
"taskId": "another#build",
"hash": "90d25abdd579d2bf"
"hash": "3639431fdcdf9f9e"
}
{
"taskId": "my-app#build",
"hash": "467895752c6e4d42"
"hash": "6eea03fab6f9a8c8"
}
{
"taskId": "util#build",
"hash": "728076a89c49afbf"
"hash": "bf1798d3e46e1b48"
}

Change my-app#build dependsOn
$ cp "$TESTDIR/fixture-configs/c-my-app-depends-on.json" "$(pwd)/turbo.json" && git commit -am "no comment" --quiet
$ ${TURBO} build --dry=json | jq -r '.tasks | sort_by(.taskId)[] | {taskId, hash}'
{
"taskId": "another#build",
"hash": "90d25abdd579d2bf"
"hash": "3639431fdcdf9f9e"
}
{
"taskId": "my-app#build",
"hash": "9ff4347eebe225a1"
"hash": "8637a0f5db686164"
}
{
"taskId": "util#build",
"hash": "728076a89c49afbf"
"hash": "bf1798d3e46e1b48"
}

Non-materially modifying the dep graph does nothing.
$ cp "$TESTDIR/fixture-configs/d-depends-on-util.json" "$(pwd)/turbo.json" && git commit -am "no comment" --quiet
$ ${TURBO} build --dry=json | jq -r '.tasks | sort_by(.taskId)[] | {taskId, hash}'
{
"taskId": "another#build",
"hash": "90d25abdd579d2bf"
"hash": "3639431fdcdf9f9e"
}
{
"taskId": "my-app#build",
"hash": "9ff4347eebe225a1"
"hash": "8637a0f5db686164"
}
{
"taskId": "util#build",
"hash": "728076a89c49afbf"
"hash": "bf1798d3e46e1b48"
}


Expand All @@ -71,13 +71,13 @@ Change util#build impacts itself and my-app
$ ${TURBO} build --dry=json | jq -r '.tasks | sort_by(.taskId)[] | {taskId, hash}'
{
"taskId": "another#build",
"hash": "90d25abdd579d2bf"
"hash": "3639431fdcdf9f9e"
}
{
"taskId": "my-app#build",
"hash": "fa7a059de209da9b"
"hash": "2721f01b53b758d0"
}
{
"taskId": "util#build",
"hash": "7b57a7ca5e311e4d"
"hash": "74c8eb9bab702b4b"
}
8 changes: 4 additions & 4 deletions turborepo-tests/integration/tests/engines.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ Setup
$ mv package.json.new package.json

Check a hash
$ ${TURBO} build --dry=json --filter=my-app | jq ".tasks.[0].hash"
"e1b18c14c735bc25"
$ ${TURBO} build --dry=json --filter=my-app | jq '.tasks | last | .hash'
"56d7eb9a31d82ee0"
Change engines
$ jq '.engines = {"node": ">=16"}' package.json > package.json.new
$ mv package.json.new package.json

Verify hash has changed
$ ${TURBO} build --dry=json --filter=my-app | jq ".tasks.[0].hash"
"639b83eff0f48891"
$ ${TURBO} build --dry=json --filter=my-app | jq ".tasks | last | .hash"
"1d8b8596ae37a40c"

Verify engines are part of global cache inputs
$ ${TURBO} build --dry=json | jq '.globalCacheInputs.engines'
Expand Down
6 changes: 3 additions & 3 deletions turborepo-tests/integration/tests/global-deps.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Run a build
\xe2\x80\xa2 Packages in scope: my-app (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
my-app:build: cache miss, executing d930bae670df2f3c
my-app:build: cache miss, executing 2a57e19ce0b2cfd5

Tasks: 1 successful, 1 total
Cached: 0 cached, 1 total
Expand All @@ -18,7 +18,7 @@ Run a build
\xe2\x80\xa2 Packages in scope: my-app (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
my-app:build: cache miss, executing fdbc268e2766ec41
my-app:build: cache miss, executing 3883869b5e1dc9cf

Tasks: 1 successful, 1 total
Cached: 0 cached, 1 total
Expand All @@ -29,7 +29,7 @@ Run a build
\xe2\x80\xa2 Packages in scope: my-app (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
my-app:build: cache hit, suppressing logs 7a2d3560117367eb
my-app:build: cache hit, suppressing logs 3883869b5e1dc9cf

Tasks: 1 successful, 1 total
Cached: 1 cached, 1 total
Expand Down
10 changes: 5 additions & 5 deletions turborepo-tests/integration/tests/global-env.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Setup
\xe2\x80\xa2 Packages in scope: util (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
util:build: cache miss, executing 728076a89c49afbf
util:build: cache miss, executing bf1798d3e46e1b48

Tasks: 1 successful, 1 total
Cached: 0 cached, 1 total
Expand All @@ -19,7 +19,7 @@ Setup
\xe2\x80\xa2 Packages in scope: util (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
util:build: cache hit, suppressing logs 728076a89c49afbf
util:build: cache hit, suppressing logs bf1798d3e46e1b48

Tasks: 1 successful, 1 total
Cached: 1 cached, 1 total
Expand All @@ -30,7 +30,7 @@ Setup
\xe2\x80\xa2 Packages in scope: util (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
util:build: cache miss, executing 2dcaff0115928c16
util:build: cache miss, executing 265e40ee03ae83ec

Tasks: 1 successful, 1 total
Cached: 0 cached, 1 total
Expand All @@ -41,7 +41,7 @@ Setup
\xe2\x80\xa2 Packages in scope: util (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
util:build: cache hit, suppressing logs 728076a89c49afbf
util:build: cache hit, suppressing logs bf1798d3e46e1b48

Tasks: 1 successful, 1 total
Cached: 1 cached, 1 total
Expand All @@ -52,7 +52,7 @@ Setup
\xe2\x80\xa2 Packages in scope: util (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
util:build: cache miss, executing fec5ab9927aa9018
util:build: cache miss, executing b8f403756f67074c

Tasks: 1 successful, 1 total
Cached: 0 cached, 1 total
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
\xe2\x80\xa2 Packages in scope: app-a, pkg-a (esc)
\xe2\x80\xa2 Running dev in 2 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
app-a:dev: cache miss, executing 2ba73becb39b6cd9
app-a:dev: cache miss, executing 7def3a3e7f1235de
app-a:dev:
app-a:dev: > dev
app-a:dev: > echo dev-app-a
Expand Down
2 changes: 1 addition & 1 deletion turborepo-tests/integration/tests/pkg-inference.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Setup
\xe2\x80\xa2 Packages in scope: util (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
util:build: cache miss, executing 728076a89c49afbf
util:build: cache miss, executing bf1798d3e46e1b48
util:build:
util:build: > build
util:build: > echo building
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Make sure that the internal util package is part of the prune output
\xe2\x80\xa2 Packages in scope: docs, shared, util (esc)
\xe2\x80\xa2 Running new-task in 3 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
docs:new-task: cache miss, executing 73e253af9e02222a
docs:new-task: cache miss, executing 869a9c24e803c5d6
docs:new-task:
docs:new-task: > docs@ new-task .*out(\/|\\)apps(\/|\\)docs (re)
docs:new-task: > echo building
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Running build for my-app succeeds
\xe2\x80\xa2 Packages in scope: my-app (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
my-app:build: cache miss, executing c57477b17ebc0894
my-app:build: cache miss, executing e228bd94fd46352c
my-app:build:
my-app:build: > build
my-app:build: > echo building
Expand All @@ -26,7 +26,7 @@ Update exluded file and try again
\xe2\x80\xa2 Packages in scope: my-app (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
my-app:build: cache hit, replaying logs c57477b17ebc0894
my-app:build: cache hit, replaying logs e228bd94fd46352c
my-app:build:
my-app:build: > build
my-app:build: > echo building
Expand Down
6 changes: 3 additions & 3 deletions turborepo-tests/integration/tests/run-caching/root-deps.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Warm the cache
\xe2\x80\xa2 Packages in scope: another (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
another:build: cache miss, executing 22f33d1d910da7f2
another:build: cache miss, executing 2e4e289aeb0b6055

Tasks: 1 successful, 1 total
Cached: 0 cached, 1 total
Expand All @@ -19,7 +19,7 @@ All tasks should be a cache miss, even ones that don't depend on changed package
\xe2\x80\xa2 Packages in scope: another (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
another:build: cache miss, executing 5dd1314cac1b01ff
another:build: cache miss, executing ebc7de7a6c0c5543
Tasks: 1 successful, 1 total
Cached: 0 cached, 1 total
Expand All @@ -34,7 +34,7 @@ Cache hit since only tracked files contribute to root dep hash
\xe2\x80\xa2 Packages in scope: another (esc)
\xe2\x80\xa2 Running build in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
another:build: cache hit, suppressing logs 5dd1314cac1b01ff
another:build: cache hit, suppressing logs ebc7de7a6c0c5543
Tasks: 1 successful, 1 total
Cached: 1 cached, 1 total
Expand Down
4 changes: 2 additions & 2 deletions turborepo-tests/integration/tests/run-logging/errors-only.t
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Setup
\xe2\x80\xa2 Packages in scope: app-a (esc)
\xe2\x80\xa2 Running builderror in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
app-a:builderror: cache miss, executing f04abedd2cd08143
app-a:builderror: cache miss, executing 7e337a3261100818
app-a:builderror:
app-a:builderror: > builderror
app-a:builderror: > echo error-builderror-app-a && exit 1
Expand Down Expand Up @@ -67,7 +67,7 @@ Setup
\xe2\x80\xa2 Packages in scope: app-a (esc)
\xe2\x80\xa2 Running builderror2 in 1 packages (esc)
\xe2\x80\xa2 Remote caching disabled (esc)
app-a:builderror2: cache miss, executing afea12cd69b5cd5f
app-a:builderror2: cache miss, executing 3731518fa339b920
app-a:builderror2:
app-a:builderror2: > builderror2
app-a:builderror2: > echo error-builderror2-app-a && exit 1
Expand Down
Loading

0 comments on commit 986d423

Please sign in to comment.