-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tests] A better sandboxing of tests and builds #123
Open
yoannmoinet
wants to merge
6
commits into
yoann/add-more-injection-points
Choose a base branch
from
yoann/better-sandbox-tests
base: yoann/add-more-injection-points
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
71ff74a
Inconsequential config updates and bumps
yoannmoinet dc74a2e
More reliable environment setup for Jest running context
yoannmoinet 1cb88e2
Sandbox fixture projects and builds in a temp working directory
yoannmoinet 91217cc
Bump node to 18.20.5
yoannmoinet 0461840
Lock update
yoannmoinet 19a74d7
Post review update
yoannmoinet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
This file was deleted.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Datadog build-plugins | ||
Copyright 2024-present Datadog, Inc. | ||
Copyright 2025-present Datadog, Inc. | ||
|
||
This product includes software developed at Datadog (https://www.datadoghq.com/). |
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
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
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
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
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 |
---|---|---|
@@ -1 +1,11 @@ | ||
massiveProject | ||
yarn-error.log | ||
.yarn/* | ||
!.yarn/cache | ||
!.yarn/patches | ||
!.yarn/releases | ||
!.yarn/plugins | ||
!.vscode | ||
|
||
node_modules/ | ||
dist/ |
Binary file added
BIN
+672 KB
...sts/src/_jest/fixtures/.yarn/cache/@remix-run-router-npm-1.21.0-22ebfe59d7-cf0fb69d19.zip
Binary file not shown.
Binary file added
BIN
+4.52 KB
...ages/tests/src/_jest/fixtures/.yarn/cache/ansi-styles-npm-3.2.1-8cb8107983-d85ade01c1.zip
Binary file not shown.
Binary file added
BIN
+10.5 KB
packages/tests/src/_jest/fixtures/.yarn/cache/chalk-npm-2.3.1-f10c7b2b06-53f7346b01.zip
Binary file not shown.
Binary file added
BIN
+10.2 KB
...es/tests/src/_jest/fixtures/.yarn/cache/color-convert-npm-1.9.3-1fe690075e-ffa3190250.zip
Binary file not shown.
Binary file added
BIN
+4.95 KB
packages/tests/src/_jest/fixtures/.yarn/cache/color-name-npm-1.1.3-728b7b5d39-09c5d3e33d.zip
Binary file not shown.
Binary file added
BIN
+2.33 KB
...s/src/_jest/fixtures/.yarn/cache/escape-string-regexp-npm-1.0.5-3284de402f-6092fda75c.zip
Binary file not shown.
Binary file added
BIN
+2.38 KB
packages/tests/src/_jest/fixtures/.yarn/cache/has-flag-npm-3.0.0-16ac11fe05-4a15638b45.zip
Binary file not shown.
Binary file added
BIN
+1.1 MB
packages/tests/src/_jest/fixtures/.yarn/cache/react-dom-npm-19.0.0-b7981c573e-aa64a2f199.zip
Binary file not shown.
Binary file added
BIN
+63.7 KB
packages/tests/src/_jest/fixtures/.yarn/cache/react-npm-19.0.0-e33c9aa1c0-2490969c50.zip
Binary file not shown.
Binary file added
BIN
+248 KB
...ests/src/_jest/fixtures/.yarn/cache/react-router-dom-npm-6.28.0-3bd3cd7fc0-e637825132.zip
Binary file not shown.
Binary file added
BIN
+225 KB
...es/tests/src/_jest/fixtures/.yarn/cache/react-router-npm-6.28.0-8611821701-f021a64451.zip
Binary file not shown.
Binary file added
BIN
+22.6 KB
packages/tests/src/_jest/fixtures/.yarn/cache/scheduler-npm-0.25.0-f89e6cad04-e661e38503.zip
Binary file not shown.
Binary file added
BIN
+3.92 KB
...s/tests/src/_jest/fixtures/.yarn/cache/supports-color-npm-5.5.0-183ac537bc-5f505c6fa3.zip
Binary file not shown.
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,4 @@ | ||
compressionLevel: mixed | ||
defaultSemverRangePrefix: "" | ||
enableGlobalCache: false | ||
nodeLinker: node-modules |
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
packages/tests/src/_jest/fixtures/easy_project/package.json
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,13 @@ | ||
{ | ||
"name": "@tests/easy_project", | ||
"private": true, | ||
"license": "MIT", | ||
"author": "Datadog", | ||
"packageManager": "[email protected]", | ||
"devDependencies": { | ||
"chalk": "2.3.1", | ||
"react": "19.0.0", | ||
"react-dom": "19.0.0", | ||
"react-router-dom": "6.28.0" | ||
} | ||
} |
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
5 changes: 5 additions & 0 deletions
5
packages/tests/src/_jest/fixtures/fake-file-to-inject-before.js
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,5 @@ | ||
// Unless explicitly stated otherwise all files in this repository are licensed under the MIT License. | ||
// This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
// Copyright 2019-Present Datadog, Inc. | ||
|
||
console.log("Hello injection from local file in before."); |
5 changes: 5 additions & 0 deletions
5
packages/tests/src/_jest/fixtures/fake-file-to-inject-middle.js
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,5 @@ | ||
// Unless explicitly stated otherwise all files in this repository are licensed under the MIT License. | ||
// This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
// Copyright 2019-Present Datadog, Inc. | ||
|
||
console.log("Hello injection from local file in middle."); |
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.
15 changes: 15 additions & 0 deletions
15
packages/tests/src/_jest/fixtures/hard_project/package.json
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,15 @@ | ||
{ | ||
"name": "@tests/hard_project", | ||
"private": true, | ||
"license": "MIT", | ||
"author": "Datadog", | ||
"packageManager": "[email protected]", | ||
"dependencies": { | ||
"chalk": "2.3.1" | ||
}, | ||
"devDependencies": { | ||
"react": "19.0.0", | ||
"react-dom": "19.0.0", | ||
"react-router-dom": "6.28.0" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 5 additions & 4 deletions
9
...s/src/_jest/fixtures/project/package.json → ...ges/tests/src/_jest/fixtures/package.json
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 |
---|---|---|
@@ -1,10 +1,11 @@ | ||
{ | ||
"name": "project", | ||
"name": "@tests/fixtures", | ||
"private": true, | ||
"license": "MIT", | ||
"author": "Datadog", | ||
"packageManager": "[email protected]", | ||
"dependencies": { | ||
"chalk": "2.3.1" | ||
} | ||
"workspaces": [ | ||
"hard_project", | ||
"easy_project" | ||
] | ||
} |
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,149 @@ | ||
# This file is generated by running "yarn install" inside your project. | ||
# Manual changes might be lost - proceed with caution! | ||
|
||
__metadata: | ||
version: 8 | ||
cacheKey: 10 | ||
|
||
"@remix-run/router@npm:1.21.0": | ||
version: 1.21.0 | ||
resolution: "@remix-run/router@npm:1.21.0" | ||
checksum: 10/cf0fb69d19c1b79095ff67c59cea89086f3982a9a54c8a993818a60fc76e0ebab5a8db647c1a96a662729fad8e806ddd0a96622adf473f5a9f0b99998b2dbad4 | ||
languageName: node | ||
linkType: hard | ||
|
||
"@tests/easy_project@workspace:easy_project": | ||
version: 0.0.0-use.local | ||
resolution: "@tests/easy_project@workspace:easy_project" | ||
dependencies: | ||
chalk: "npm:2.3.1" | ||
react: "npm:19.0.0" | ||
react-dom: "npm:19.0.0" | ||
react-router-dom: "npm:6.28.0" | ||
languageName: unknown | ||
linkType: soft | ||
|
||
"@tests/fixtures@workspace:.": | ||
version: 0.0.0-use.local | ||
resolution: "@tests/fixtures@workspace:." | ||
languageName: unknown | ||
linkType: soft | ||
|
||
"@tests/hard_project@workspace:hard_project": | ||
version: 0.0.0-use.local | ||
resolution: "@tests/hard_project@workspace:hard_project" | ||
dependencies: | ||
chalk: "npm:2.3.1" | ||
react: "npm:19.0.0" | ||
react-dom: "npm:19.0.0" | ||
react-router-dom: "npm:6.28.0" | ||
languageName: unknown | ||
linkType: soft | ||
|
||
"ansi-styles@npm:^3.2.0": | ||
version: 3.2.1 | ||
resolution: "ansi-styles@npm:3.2.1" | ||
dependencies: | ||
color-convert: "npm:^1.9.0" | ||
checksum: 10/d85ade01c10e5dd77b6c89f34ed7531da5830d2cb5882c645f330079975b716438cd7ebb81d0d6e6b4f9c577f19ae41ab55f07f19786b02f9dfd9e0377395665 | ||
languageName: node | ||
linkType: hard | ||
|
||
"chalk@npm:2.3.1": | ||
version: 2.3.1 | ||
resolution: "chalk@npm:2.3.1" | ||
dependencies: | ||
ansi-styles: "npm:^3.2.0" | ||
escape-string-regexp: "npm:^1.0.5" | ||
supports-color: "npm:^5.2.0" | ||
checksum: 10/53f7346b01d5bd93cceb1645bf3858ef4a211b4c69be152e391cdbe386038308e227c14f5518c4f437cbca72054f0593c19f3ebc75b042892c79f46b0605f60b | ||
languageName: node | ||
linkType: hard | ||
|
||
"color-convert@npm:^1.9.0": | ||
version: 1.9.3 | ||
resolution: "color-convert@npm:1.9.3" | ||
dependencies: | ||
color-name: "npm:1.1.3" | ||
checksum: 10/ffa319025045f2973919d155f25e7c00d08836b6b33ea2d205418c59bd63a665d713c52d9737a9e0fe467fb194b40fbef1d849bae80d674568ee220a31ef3d10 | ||
languageName: node | ||
linkType: hard | ||
|
||
"color-name@npm:1.1.3": | ||
version: 1.1.3 | ||
resolution: "color-name@npm:1.1.3" | ||
checksum: 10/09c5d3e33d2105850153b14466501f2bfb30324a2f76568a408763a3b7433b0e50e5b4ab1947868e65cb101bb7cb75029553f2c333b6d4b8138a73fcc133d69d | ||
languageName: node | ||
linkType: hard | ||
|
||
"escape-string-regexp@npm:^1.0.5": | ||
version: 1.0.5 | ||
resolution: "escape-string-regexp@npm:1.0.5" | ||
checksum: 10/6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410 | ||
languageName: node | ||
linkType: hard | ||
|
||
"has-flag@npm:^3.0.0": | ||
version: 3.0.0 | ||
resolution: "has-flag@npm:3.0.0" | ||
checksum: 10/4a15638b454bf086c8148979aae044dd6e39d63904cd452d970374fa6a87623423da485dfb814e7be882e05c096a7ccf1ebd48e7e7501d0208d8384ff4dea73b | ||
languageName: node | ||
linkType: hard | ||
|
||
"react-dom@npm:19.0.0": | ||
version: 19.0.0 | ||
resolution: "react-dom@npm:19.0.0" | ||
dependencies: | ||
scheduler: "npm:^0.25.0" | ||
peerDependencies: | ||
react: ^19.0.0 | ||
checksum: 10/aa64a2f1991042f516260e8b0eca0ae777b6c8f1aa2b5ae096e80bbb6ac9b005aef2bca697969841d34f7e1819556263476bdfea36c35092e8d9aefde3de2d9a | ||
languageName: node | ||
linkType: hard | ||
|
||
"react-router-dom@npm:6.28.0": | ||
version: 6.28.0 | ||
resolution: "react-router-dom@npm:6.28.0" | ||
dependencies: | ||
"@remix-run/router": "npm:1.21.0" | ||
react-router: "npm:6.28.0" | ||
peerDependencies: | ||
react: ">=16.8" | ||
react-dom: ">=16.8" | ||
checksum: 10/e637825132ea96c3514ef7b8322f9bf0b752a942d6b4ffc4c20e389b5911726adf3dba8208ed4b97bf5b9c3bd465d9d1a1db1a58a610a8d528f18d890e0b143f | ||
languageName: node | ||
linkType: hard | ||
|
||
"react-router@npm:6.28.0": | ||
version: 6.28.0 | ||
resolution: "react-router@npm:6.28.0" | ||
dependencies: | ||
"@remix-run/router": "npm:1.21.0" | ||
peerDependencies: | ||
react: ">=16.8" | ||
checksum: 10/f021a644513144884a567d9c2dcc432e8e3233f931378c219c5a3b5b842340f0faca86225a708bafca1e9010965afe1a7dada28aef5b7b6138c885c0552d9a7d | ||
languageName: node | ||
linkType: hard | ||
|
||
"react@npm:19.0.0": | ||
version: 19.0.0 | ||
resolution: "react@npm:19.0.0" | ||
checksum: 10/2490969c503f644703c88990d20e4011fa6119ddeca451e9de48f6d7ab058d670d2852a5fcd3aa3cd90a923ab2815d532637bd4a814add402ae5c0d4f129ee71 | ||
languageName: node | ||
linkType: hard | ||
|
||
"scheduler@npm:^0.25.0": | ||
version: 0.25.0 | ||
resolution: "scheduler@npm:0.25.0" | ||
checksum: 10/e661e38503ab29a153429a99203fefa764f28b35c079719eb5efdd2c1c1086522f6653d8ffce388209682c23891a6d1d32fa6badf53c35fb5b9cd0c55ace42de | ||
languageName: node | ||
linkType: hard | ||
|
||
"supports-color@npm:^5.2.0": | ||
version: 5.5.0 | ||
resolution: "supports-color@npm:5.5.0" | ||
dependencies: | ||
has-flag: "npm:^3.0.0" | ||
checksum: 10/5f505c6fa3c6e05873b43af096ddeb22159831597649881aeb8572d6fe3b81e798cc10840d0c9735e0026b250368851b7f77b65e84f4e4daa820a4f69947f55b | ||
languageName: node | ||
linkType: hard |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just FYI, the
setup-node
action can be configured to use the exact same version as volta.Could be handy!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super useful, thanks!