-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
2,029 additions
and
400 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
Large diffs are not rendered by default.
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
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,44 @@ | ||
#!/usr/bin/env bash | ||
|
||
# -------------------------------------------------------------------- | ||
# Publishes web3 to a local npm proxy registry in CI so the package | ||
# can be E2E tested by installing it in another project | ||
# -------------------------------------------------------------------- | ||
|
||
# Exit immediately on error | ||
set -o errexit | ||
|
||
if [ -z "$CI" ]; then | ||
|
||
echo "======================================================================" | ||
echo "This script publishes web3 to an npm proxy registry. Only run in CI." | ||
echo "======================================================================" | ||
|
||
exit 1 | ||
|
||
fi | ||
|
||
# Launch npm proxy registry | ||
npx verdaccio --config verdaccio.yml & npx wait-port 4873 | ||
|
||
# `npm add user` | ||
curl -XPUT \ | ||
-H "Content-type: application/json" \ | ||
-d '{ "name": "test", "password": "test" }' \ | ||
'http://localhost:4873/-/user/org.couchdb.user:test' | ||
|
||
# `npm login` | ||
npx npm-auth-to-token \ | ||
-u test \ | ||
-p test \ | ||
-e test@test.com \ | ||
-r http://localhost:4873 | ||
|
||
# `npm version patch` | ||
npx lerna exec -- npm version patch | ||
|
||
# `npm publish` | ||
npx lerna exec --concurrency 1 -- npm publish \ | ||
--tag e2e \ | ||
--registry http://localhost:4873 \ | ||
|
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,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
# ------------------------------------------------------------------------- | ||
# Run @truffle/contract's unit tests using a candidate branch of web3 | ||
# which has been published to a proxy npm registry in `e2e.npm.publish.sh` | ||
# ------------------------------------------------------------------------- | ||
|
||
# Exit immediately on error | ||
set -o errexit | ||
|
||
# Launch geth | ||
npm run geth | ||
|
||
# Install truffle | ||
git clone https://github.com/trufflesuite/truffle.git | ||
cd truffle | ||
yarn bootstrap | ||
|
||
# @truffle/contract | ||
cd packages/contract | ||
|
||
# Uninstall / re-install web3 | ||
yarn remove web3 | ||
|
||
npm install web3@e2e \ | ||
--registry http://localhost:4873 \ | ||
--force | ||
|
||
# Geth tests | ||
GETH=true npm test |
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 @@ | ||
storage: ./storage | ||
auth: | ||
htpasswd: | ||
file: ./htpasswd | ||
uplinks: | ||
npmjs: | ||
url: https://registry.npmjs.org/ | ||
packages: | ||
'@*/*': | ||
# scoped packages | ||
access: $all | ||
publish: $all | ||
proxy: npmjs | ||
'**': | ||
access: $all | ||
publish: $all | ||
proxy: npmjs | ||
logs: | ||
- {type: stdout, format: pretty, level: warn} |