CircleCI: Authenticate to github npm registry
We need to access private packages from Github Package Registry, here we
set it up for Circle CI with a GITHUB_TOKEN.
@@ -19,16 +19,24 @@ jobs:
executor: docker-node
steps:
- checkout
+ - run:
+ name: Authenticate GitHub Package Registry
+ working_directory: ~/project/implementation
+ command: echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc
- run:
name: Lint JS
+ working_directory: ~/project/implementation
command: |
- cd implementation/
npm install
npm run js:lint
lint_solidity:
executor: docker-node
steps:
- checkout
+ - run:
+ name: Authenticate GitHub Package Registry
+ working_directory: ~/project/implementation
+ command: echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc
- run:
name: Lint Solidity
working_directory: ~/project/implementation
@@ -43,11 +51,16 @@ jobs:
- run: sudo npm install -g ganache-cli@6.4.2
- run:
name: Running testrpc
+ working_directory: ~/project/implementation
command: ganache-cli
background: true
+ - run:
+ name: Authenticate GitHub Package Registry
+ working_directory: ~/project/implementation
+ command: echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc
- run:
name: Run NPM tests
- working_directory: ~/project/implementation/contracts
+ working_directory: ~/project/implementation
command: npm install && npm run test
integration_test_contracts:
executor: docker-node
@@ -56,15 +69,20 @@ jobs:
- run: sudo npm install -g ganache-cli@6.4.2
- run:
name: Running testrpc
+ working_directory: ~/project/implementation
command: ganache-cli
background: true
+ - run:
+ name: Authenticate GitHub Package Registry
+ working_directory: ~/project/implementation
+ command: echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc
- run:
name: Deploy Uniswap
working_directory: ~/project/implementation/scripts
command: ./deploy_uniswap.sh
- run:
name: Run NPM tests
- working_directory: ~/project/implementation/contracts
+ working_directory: ~/project/implementation
command: npm install && npm run integration-test
generate_pngs:
docker:
