Monorepo initialization (#101)
* Update postinstall script * Add initialize script, simplify readme * Unsafe perm * Added initialize-root job * Initialize-root only on master
This commit is contained in:
parent
81a936af45
commit
3be812d55f
@ -35,6 +35,12 @@ jobs:
|
|||||||
key: initialize-{{ .Environment.CIRCLE_SHA1 }}
|
key: initialize-{{ .Environment.CIRCLE_SHA1 }}
|
||||||
paths:
|
paths:
|
||||||
- ~/project
|
- ~/project
|
||||||
|
initialize-root:
|
||||||
|
docker:
|
||||||
|
- image: circleci/node:10.15
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: sudo su - -c 'export CI=true && cd /home/circleci/project && yarn initialize && yarn test'
|
||||||
build:
|
build:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/node:10.15
|
- image: circleci/node:10.15
|
||||||
@ -111,6 +117,10 @@ workflows:
|
|||||||
tokenbridge:
|
tokenbridge:
|
||||||
jobs:
|
jobs:
|
||||||
- initialize
|
- initialize
|
||||||
|
- initialize-root:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only: master
|
||||||
- build:
|
- build:
|
||||||
requires:
|
requires:
|
||||||
- initialize
|
- initialize
|
||||||
|
24
README.md
24
README.md
@ -47,26 +47,14 @@ The POA TokenBridge provides three operational modes:
|
|||||||
|
|
||||||
## Initializing the monorepository
|
## Initializing the monorepository
|
||||||
|
|
||||||
Clone the repository with submodules:
|
Clone the repository:
|
||||||
```bash
|
```bash
|
||||||
git clone --recursive https://github.com/poanetwork/tokenbridge
|
git clone https://github.com/poanetwork/tokenbridge
|
||||||
|
|
||||||
# or initialize submodules if already cloned without --recursive option:
|
|
||||||
git submodule update --init
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Install dependencies:
|
Initialize submodules, install dependencies, compile the Smart Contracts:
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn install && yarn install:deploy
|
yarn initialize
|
||||||
```
|
|
||||||
|
|
||||||
_**Note**: The installation should be performed with an unprivileged Linux account or with the following flag: `yarn install --unsafe-perm`. [More information](https://docs.npmjs.com/misc/scripts#user)_
|
|
||||||
|
|
||||||
Compile the Smart Contracts
|
|
||||||
|
|
||||||
```
|
|
||||||
yarn compile:contracts
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Linting
|
## Linting
|
||||||
@ -97,6 +85,10 @@ Additionaly there are end-to-end tests for [Oracle](oracle-e2e/README.md) and [U
|
|||||||
|
|
||||||
For details on building, running and developing please refer to respective READMEs in sub-repositories.
|
For details on building, running and developing please refer to respective READMEs in sub-repositories.
|
||||||
|
|
||||||
|
## Building, running and deploying
|
||||||
|
|
||||||
|
Please refer to the instructions in sub-directories.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
See the [CONTRIBUTING](CONTRIBUTING.md) document for contribution, testing and pull request protocol.
|
See the [CONTRIBUTING](CONTRIBUTING.md) document for contribution, testing and pull request protocol.
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
"contracts"
|
"contracts"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"initialize": "yarn clean && git submodule update --init && yarn install --unsafe-perm --frozen-lockfile && yarn install:deploy && yarn compile:contracts",
|
||||||
"build": "yarn workspace ui run build",
|
"build": "yarn workspace ui run build",
|
||||||
"lint": "yarn wsrun --exclude oracle-e2e --exclude ui-e2e --exclude poa-parity-bridge-contracts lint",
|
"lint": "yarn wsrun --exclude oracle-e2e --exclude ui-e2e --exclude poa-parity-bridge-contracts lint",
|
||||||
"test": "yarn wsrun --exclude monitor --exclude oracle-e2e --exclude ui-e2e test",
|
"test": "yarn wsrun --exclude monitor --exclude oracle-e2e --exclude ui-e2e test",
|
||||||
@ -39,7 +40,7 @@
|
|||||||
"ui-e2e": "./ui-e2e/run-tests.sh",
|
"ui-e2e": "./ui-e2e/run-tests.sh",
|
||||||
"clean": "rm -rf ./node_modules ./**/node_modules ./**/**/node_modules ./**/build",
|
"clean": "rm -rf ./node_modules ./**/node_modules ./**/**/node_modules ./**/build",
|
||||||
"compile:contracts": "yarn workspace poa-parity-bridge-contracts run compile",
|
"compile:contracts": "yarn workspace poa-parity-bridge-contracts run compile",
|
||||||
"install:deploy": "cd contracts/deploy && npm install --silent",
|
"install:deploy": "cd contracts/deploy && npm install --unsafe-perm --silent",
|
||||||
"postinstall": "ln -sf $(pwd)/node_modules/openzeppelin-solidity/ contracts/node_modules/openzeppelin-solidity"
|
"postinstall": "ln -sf $(pwd)/node_modules/openzeppelin-solidity/ contracts/node_modules/openzeppelin-solidity"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
"coverage": "react-app-rewired test --env=jsdom --coverage",
|
"coverage": "react-app-rewired test --env=jsdom --coverage",
|
||||||
"coveralls": "cat ./coverage/lcov.info | node node_modules/.bin/coveralls",
|
"coveralls": "cat ./coverage/lcov.info | node node_modules/.bin/coveralls",
|
||||||
"eject": "react-app-rewired eject",
|
"eject": "react-app-rewired eject",
|
||||||
"postinstall": "(cp lib/web3-eth/index.js ../node_modules/web3-eth/src && cp lib/web3-eth/index.js ./node_modules/web3-eth/src)"
|
"postinstall": "(cp lib/web3-eth/index.js ../node_modules/web3-eth/src; cp lib/web3-eth/index.js ./node_modules/web3-eth/src) || :"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-eslint": "^10.0.1",
|
"babel-eslint": "^10.0.1",
|
||||||
|
Loading…
Reference in New Issue
Block a user