-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: run e2e adapters in monorepo setup
- Loading branch information
Showing
6 changed files
with
74 additions
and
14 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
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,26 @@ | ||
#!/bin/bash | ||
|
||
# this script will make checked out files move around and make git working directory dirty | ||
# this is primarly for setting up monorepo structure for e2e tests that run in CI to avoid | ||
# having to maintain additional fixture as we want to test all the same things as in single repo | ||
# case | ||
|
||
# move all items in the current directory to a new directory called workspace | ||
rm -rf workspace | ||
items=(*) | ||
mkdir workspace | ||
mv ${items[*]} workspace | ||
|
||
# create root package.json and mark workspace directory as a npm/yarn workspace | ||
echo '{ "workspaces": ["workspace"], "scripts": { "test": "EXTRA_NTL_CLI_ARGS=\"--filter=workspace\" E2E_MONOREPO=\"true\" npm run test -w workspace" }, "private": true }' > package.json | ||
|
||
# update netlify.toml build command and publish dir | ||
sed -i.bak -e 's/npm run build/npm run build -w workspace/g' -e 's/public/workspace\/public/g' workspace/netlify.toml | ||
|
||
# update workspace package.json | ||
sed -i.bak -e 's/..\/..\/scripts\/cypress-run-with-conditional-record-flag.js/..\/..\/..\/scripts\/cypress-run-with-conditional-record-flag.js/g' workspace/package.json | ||
|
||
git init | ||
|
||
# debug | ||
find . -type f |
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,12 +1,13 @@ | ||
[build] | ||
command = "npm run build" | ||
publish = "public/" | ||
command = "npm run build" | ||
publish = "public/" | ||
base = "" | ||
|
||
[build.environment] | ||
NETLIFY_IMAGE_CDN = "true" | ||
NETLIFY_IMAGE_CDN = "true" | ||
|
||
[images] | ||
remote_images = [ | ||
"https://images.unsplash.com/.*", | ||
"https://www.gatsbyjs.com/.*", | ||
] | ||
remote_images = [ | ||
"https://images.unsplash.com/.*", | ||
"https://www.gatsbyjs.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