-
Notifications
You must be signed in to change notification settings - Fork 2k
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
MEGA: Make E2E Great Again #3444
Merged
Changes from 49 commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
a5d4bbd
attempt
Murderlon 6494bb7
attemps
Murderlon 6c612a0
Merge branch 'main' into cypress
Murderlon 4ff1745
More wip
Murderlon 978e53e
Merge branch 'main' into cypress
Murderlon 4f529ea
another wip
Murderlon 7bfc7cd
fix typescript
Murderlon c5386f6
Merge branch 'main' into cypress
Murderlon 39e2865
Proper tests, generate test script, other improvements
Murderlon 2a0673a
tweaks
Murderlon bef8806
Fix generate test formatting
Murderlon 6e1f4a3
Fix eslint errors and add eslint-cypress
Murderlon eb92b39
Merge branch 'main' into cypress
Murderlon e59a0c8
Add companion server, add more tests
Murderlon 77bfdad
Update contributing.md
Murderlon debcf10
Move .parceltc into e2e, fix env and companion setup
Murderlon 422b874
Revert eslint formatting
Murderlon 47eff74
Improve tus tests for reliability
Murderlon 6d7cd80
Update GitHub Actions
Murderlon 2134a09
Don't set companion url in env vars, always local
Murderlon cb5b04e
fixup! Revert eslint formatting
aduh95 a165e96
Update `yarn.lock` (fix `yarn dev`)
aduh95 e56b84c
remove unrelated changes (wrong merge?)
aduh95 88d3ce2
fixup! remove unrelated changes (wrong merge?)
aduh95 169a622
fixup! fixup! remove unrelated changes (wrong merge?)
aduh95 45d4d19
Move all test resources into cypress
Murderlon a427bba
Add test for dashboard with react
Murderlon 29705ba
Create test for Vue 3 but disable it for now
Murderlon bde1b1f
Remove old test suite files
Murderlon d8297b1
Update yarn.lock
Murderlon b4a94a7
revert `.eslintrc.js` changes
aduh95 f853f3d
Update script
Murderlon a42e2de
Merge branch 'main' into cypress
Murderlon cbf095c
Merge branch 'cypress' of /~https://github.com/transloadit/uppy into cy…
Murderlon 9112e4d
Run e2e also on pull_request
Murderlon 11ede08
bin/companion.sh -> private/dev/companion.js & unify all env files
Murderlon 0272597
Back to companion.sh because that works on CI too
Murderlon 07dc38f
Improve GH Actions triggers
Murderlon 9ec5f46
Try to correctly use env in companion.sh
Murderlon cab6d92
Use `fileURLToPath` in vite.config.js
Murderlon 910af28
Update CONTRIBUTING.md
Murderlon b66d7ec
Inject contributing.md in website and fix lint error
Murderlon 45c3158
Don't ignore .env.example
Murderlon 7cce447
Also do not forget to actually commit .env.example
Murderlon c1b929b
Apply suggestions from code review
Murderlon 2716cdd
Make generate-test executable
Murderlon d31f09f
Use top level await in generate-test
Murderlon 7ddf791
Fix lint errors
Murderlon 956cd92
Actually fix lint error
Murderlon f460e7a
reuse VITE env variable for convenience
aduh95 e542df4
Upgrade npm deps
aduh95 69128fd
fixup! reuse VITE env variable for convenience
aduh95 7679bcb
fix conflicts
aduh95 1699548
Merge branch 'main' of /~https://github.com/transloadit/uppy
aduh95 ee9d715
Update `yarn.lock`
aduh95 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Rename this file to `.env` | ||
|
||
NODE_ENV=development | ||
|
||
# Companion | ||
# ======================= | ||
COMPANION_DATADIR=./output | ||
COMPANION_DOMAIN=localhost:3020 | ||
COMPANION_PROTOCOL=http | ||
COMPANION_PORT=3020 | ||
COMPANION_CLIENT_ORIGINS= | ||
COMPANION_SECRET=development | ||
|
||
COMPANION_DROPBOX_KEY=*** | ||
COMPANION_DROPBOX_SECRET=*** | ||
|
||
COMPANION_BOX_KEY=*** | ||
COMPANION_BOX_SECRET=*** | ||
|
||
COMPANION_GOOGLE_KEY=*** | ||
COMPANION_GOOGLE_SECRET=*** | ||
|
||
COMPANION_INSTAGRAM_KEY=*** | ||
COMPANION_INSTAGRAM_SECRET=*** | ||
|
||
COMPANION_FACEBOOK_KEY=*** | ||
COMPANION_FACEBOOK_SECRET=*** | ||
|
||
COMPANION_ZOOM_KEY=*** | ||
COMPANION_ZOOM_SECRET=*** | ||
|
||
COMPANION_UNSPLASH_KEY=*** | ||
COMPANION_UNSPLASH_SECRET=*** | ||
|
||
# Transloadit keys can also be used in `e2e/clients` | ||
TRANSLOADIT_KEY=*** | ||
TRANSLOADIT_TEMPLATE=*** | ||
TRANSLOADIT_SERVICE_URL=https://api2.transloadit.com | ||
|
||
# Development environment | ||
# ======================= | ||
|
||
VITE_UPLOADER=tus | ||
# VITE_UPLOADER=s3 | ||
# VITE_UPLOADER=s3-multipart | ||
# xhr will use protocol 'multipart' in companion, if used with a remote service, e.g. google drive. | ||
# If local upload will use browser XHR | ||
# VITE_UPLOADER=xhr | ||
# VITE_UPLOADER=transloadit | ||
# VITE_UPLOADER=transloadit-s3 | ||
# VITE_UPLOADER=transloadit-xhr | ||
|
||
VITE_COMPANION_URL=http://localhost:3020 | ||
VITE_TUS_ENDPOINT=https://tusd.tusdemo.net/files/ | ||
VITE_XHR_ENDPOINT=https://xhr-server.herokuapp.com/upload | ||
|
||
VITE_TRANSLOADIT_KEY=*** | ||
VITE_TRANSLOADIT_TEMPLATE=*** | ||
VITE_TRANSLOADIT_SERVICE_URL=https://api2.transloadit.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
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 |
---|---|---|
|
@@ -13,7 +13,7 @@ node_modules | |
.yarn/install-state.gz | ||
yarn-error.log | ||
|
||
env.sh | ||
.env | ||
*.local | ||
|
||
dist/ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Load local env vars. In CI, these are injected. | ||
if [ -f .env ]; then | ||
# https://gist.github.com/mihow/9c7f559807069a03e302605691f85572?permalink_comment_id=3625310#gistcomment-3625310 | ||
set -a | ||
source <(sed -e '/^#/d;/^\s*$/d' -e "s/'/'\\\''/g" -e "s/=\(.*\)/='\1'/g" .env) | ||
set +a | ||
nodemon --watch packages/@uppy/companion/src --exec node ./packages/@uppy/companion/src/standalone/start-server.js | ||
else | ||
env \ | ||
COMPANION_DATADIR="./output" \ | ||
COMPANION_DOMAIN="localhost:3020" \ | ||
COMPANION_PROTOCOL="http" \ | ||
COMPANION_PORT=3020 \ | ||
COMPANION_CLIENT_ORIGINS="" \ | ||
COMPANION_SECRET="development" \ | ||
nodemon --watch packages/@uppy/companion/src --exec node ./packages/@uppy/companion/src/standalone/start-server.js | ||
fi |
This file was deleted.
Oops, something went wrong.
This file was deleted.
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.
Have you considered /~https://github.com/motdotla/dotenv ?
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.
Yes, tried it here: 11ede08 but couldn't get it to work in CI.
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.
What didn't work? didn't it load the .env file?
If .env was inside
private/dev/.env
, then I suspect that this line was the problem:11ede08#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R146
I think dotenv searches inside CWD and not inside the directory of the .js file, so for it to work it would have to be changed to: