|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -x
|
|
|
|
set -e
|
|
|
|
set -u
|
|
|
|
set -o pipefail
|
|
|
|
|
|
|
|
# Set the environment variable 'GANACHE_ARGS' to change any optional ganache flags
|
|
|
|
# By default, the flag `--quiet` is used. Setting 'GANACHE_ARGS' will override the default.
|
|
|
|
OPTIONAL_GANACHE_ARGS="${GANACHE_ARGS---quiet}"
|
|
|
|
BASE_GANACHE_ARGS="${OPTIONAL_GANACHE_ARGS} --blockTime 2"
|
|
|
|
|
|
|
|
export PATH="$PATH:./node_modules/.bin"
|
|
|
|
export GANACHE_ARGS="${BASE_GANACHE_ARGS}"
|
|
|
|
|
|
|
|
concurrently --kill-others \
|
|
|
|
--names 'ganache,dapp,e2e' \
|
|
|
|
--prefix '[{time}][{name}]' \
|
|
|
|
--success first \
|
Switch from `npm` to `yarn` (#6843)
As a solution to the constant lockfile churn issues we've had with
`npm`, the project now uses `yarn` to manage dependencies.
The `package-lock.json` file has been replaced with `yarn.lock`, which
was created using `yarn import`. It should approximate the contents of
`package-lock.json` fairly well, though there may be some changes due to
deduplication. The codeowners file has been updated to reference this
new lockfile.
All documentation and npm scripts have been updated to reference `yarn`
rather than `npm`. Note that running scripts using `npm run` still works
fine, but it seemed better to switch those to `yarn` as well to avoid
confusion.
The `npm-audit` Bash script has been replaced with `yarn-audit`. The
output of `yarn audit` is a bit different than `npm audit` in that it
returns a bitmask to describe which severity issues were found. This
made it simpler to check the results directly from the Bash script, so
the associated `npm-audit-check.js` script was no longer required. The
output should be exactly the same, and the information is still sourced
from the same place (the npm registry).
The new `yarn-audit` script does have an external dependency: `jq`.
However, `jq` is already assumed to be present by another CI script, and
is present on all CI images we use. `jq` was not added to `package.json`
as a dependency because there is no official package on the npm
registry, just wrapper scripts. We don't need it anywhere exept on CI
anyway.
The section in `CONTRIBUTING` about how to develop inside the
`node_modules` folder was removed, as the advice was a bit dated, and
wasn't specific to this project anyway.
5 years ago
|
|
|
'yarn ganache:start' \
|
|
|
|
'yarn dapp' \
|
|
|
|
'sleep 5 && mocha test/e2e/metamask-ui.spec'
|
|
|
|
|
|
|
|
concurrently --kill-others \
|
|
|
|
--names 'ganache,dapp,e2e' \
|
|
|
|
--prefix '[{time}][{name}]' \
|
|
|
|
--success first \
|
Switch from `npm` to `yarn` (#6843)
As a solution to the constant lockfile churn issues we've had with
`npm`, the project now uses `yarn` to manage dependencies.
The `package-lock.json` file has been replaced with `yarn.lock`, which
was created using `yarn import`. It should approximate the contents of
`package-lock.json` fairly well, though there may be some changes due to
deduplication. The codeowners file has been updated to reference this
new lockfile.
All documentation and npm scripts have been updated to reference `yarn`
rather than `npm`. Note that running scripts using `npm run` still works
fine, but it seemed better to switch those to `yarn` as well to avoid
confusion.
The `npm-audit` Bash script has been replaced with `yarn-audit`. The
output of `yarn audit` is a bit different than `npm audit` in that it
returns a bitmask to describe which severity issues were found. This
made it simpler to check the results directly from the Bash script, so
the associated `npm-audit-check.js` script was no longer required. The
output should be exactly the same, and the information is still sourced
from the same place (the npm registry).
The new `yarn-audit` script does have an external dependency: `jq`.
However, `jq` is already assumed to be present by another CI script, and
is present on all CI images we use. `jq` was not added to `package.json`
as a dependency because there is no official package on the npm
registry, just wrapper scripts. We don't need it anywhere exept on CI
anyway.
The section in `CONTRIBUTING` about how to develop inside the
`node_modules` folder was removed, as the advice was a bit dated, and
wasn't specific to this project anyway.
5 years ago
|
|
|
'yarn ganache:start' \
|
|
|
|
'yarn dapp' \
|
|
|
|
'sleep 5 && mocha test/e2e/metamask-responsive-ui.spec'
|
|
|
|
|
|
|
|
concurrently --kill-others \
|
|
|
|
--names 'ganache,dapp,e2e' \
|
|
|
|
--prefix '[{time}][{name}]' \
|
|
|
|
--success first \
|
|
|
|
'yarn ganache:start' \
|
|
|
|
'yarn dapp' \
|
|
|
|
'sleep 5 && mocha test/e2e/signature-request.spec'
|
|
|
|
|
|
|
|
export GANACHE_ARGS="${BASE_GANACHE_ARGS} --deterministic --account=0x53CB0AB5226EEBF4D872113D98332C1555DC304443BEE1CF759D15798D3C55A9,25000000000000000000"
|
|
|
|
concurrently --kill-others \
|
|
|
|
--names 'ganache,e2e' \
|
|
|
|
--prefix '[{time}][{name}]' \
|
|
|
|
--success first \
|
Switch from `npm` to `yarn` (#6843)
As a solution to the constant lockfile churn issues we've had with
`npm`, the project now uses `yarn` to manage dependencies.
The `package-lock.json` file has been replaced with `yarn.lock`, which
was created using `yarn import`. It should approximate the contents of
`package-lock.json` fairly well, though there may be some changes due to
deduplication. The codeowners file has been updated to reference this
new lockfile.
All documentation and npm scripts have been updated to reference `yarn`
rather than `npm`. Note that running scripts using `npm run` still works
fine, but it seemed better to switch those to `yarn` as well to avoid
confusion.
The `npm-audit` Bash script has been replaced with `yarn-audit`. The
output of `yarn audit` is a bit different than `npm audit` in that it
returns a bitmask to describe which severity issues were found. This
made it simpler to check the results directly from the Bash script, so
the associated `npm-audit-check.js` script was no longer required. The
output should be exactly the same, and the information is still sourced
from the same place (the npm registry).
The new `yarn-audit` script does have an external dependency: `jq`.
However, `jq` is already assumed to be present by another CI script, and
is present on all CI images we use. `jq` was not added to `package.json`
as a dependency because there is no official package on the npm
registry, just wrapper scripts. We don't need it anywhere exept on CI
anyway.
The section in `CONTRIBUTING` about how to develop inside the
`node_modules` folder was removed, as the advice was a bit dated, and
wasn't specific to this project anyway.
5 years ago
|
|
|
'yarn ganache:start' \
|
|
|
|
'sleep 5 && mocha test/e2e/from-import-ui.spec'
|
|
|
|
|
|
|
|
concurrently --kill-others \
|
|
|
|
--names 'ganache,e2e' \
|
|
|
|
--prefix '[{time}][{name}]' \
|
|
|
|
--success first \
|
|
|
|
'npm run ganache:start' \
|
|
|
|
'sleep 5 && mocha test/e2e/send-edit.spec'
|
|
|
|
|
|
|
|
concurrently --kill-others \
|
|
|
|
--names 'ganache,dapp,e2e' \
|
|
|
|
--prefix '[{time}][{name}]' \
|
|
|
|
--success first \
|
|
|
|
'yarn ganache:start' \
|
|
|
|
'yarn dapp' \
|
|
|
|
'sleep 5 && mocha test/e2e/ethereum-on.spec'
|
|
|
|
|
|
|
|
export GANACHE_ARGS="${BASE_GANACHE_ARGS} --deterministic --account=0x250F458997A364988956409A164BA4E16F0F99F916ACDD73ADCD3A1DE30CF8D1,0 --account=0x53CB0AB5226EEBF4D872113D98332C1555DC304443BEE1CF759D15798D3C55A9,25000000000000000000"
|
|
|
|
concurrently --kill-others \
|
|
|
|
--names 'ganache,sendwithprivatedapp,e2e' \
|
|
|
|
--prefix '[{time}][{name}]' \
|
|
|
|
--success first \
|
|
|
|
'npm run ganache:start' \
|
|
|
|
'npm run sendwithprivatedapp' \
|
|
|
|
'sleep 5 && mocha test/e2e/incremental-security.spec'
|
|
|
|
|
|
|
|
export GANACHE_ARGS="${BASE_GANACHE_ARGS} --deterministic --account=0x53CB0AB5226EEBF4D872113D98332C1555DC304443BEE1CF759D15798D3C55A9,25000000000000000000"
|
|
|
|
concurrently --kill-others \
|
|
|
|
--names 'ganache,dapp,e2e' \
|
|
|
|
--prefix '[{time}][{name}]' \
|
|
|
|
--success first \
|
|
|
|
'yarn ganache:start' \
|
|
|
|
'yarn dapp' \
|
|
|
|
'sleep 5 && mocha test/e2e/address-book.spec'
|
|
|
|
|
|
|
|
export GANACHE_ARGS="${BASE_GANACHE_ARGS} --deterministic --account=0x53CB0AB5226EEBF4D872113D98332C1555DC304443BEE1CF759D15798D3C55A9,25000000000000000000"
|
|
|
|
concurrently --kill-others \
|
|
|
|
--names 'ganache,dapp,e2e' \
|
|
|
|
--prefix '[{time}][{name}]' \
|
|
|
|
--success first \
|
|
|
|
'node test/e2e/mock-3box/server.js' \
|
|
|
|
'yarn ganache:start' \
|
|
|
|
'yarn dapp' \
|
|
|
|
'sleep 5 && mocha test/e2e/threebox.spec'
|