Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
CircleCI: Authenticate to github npm registry
Browse files Browse the repository at this point in the history
We need to access private packages from Github Package Registry, here we
set it up for Circle CI with a GITHUB_TOKEN.
  • Loading branch information
nkuba committed Sep 29, 2019
1 parent aef6b32 commit 467a944
Showing 1 changed file with 66 additions and 54 deletions.
120 changes: 66 additions & 54 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,55 +17,67 @@ executors:
jobs:
lint_js:
executor: docker-node
working_directory: ~/project/implementation
steps:
- checkout
- run:
name: Lint JS
command: |
cd implementation/
npm install
npm run js:lint
- checkout
- run:
name: Authenticate GitHub Package Registry
command: echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc
- run:
name: Lint JS
command: |
npm install
npm run js:lint
lint_solidity:
executor: docker-node
working_directory: ~/project/implementation
steps:
- checkout
- run:
name: Lint Solidity
working_directory: ~/project/implementation
command: |
set -ex
npm install
npm run sol:lint
- checkout
- run:
name: Authenticate GitHub Package Registry
command: echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc
- run:
name: Lint Solidity
command: |
set -ex
npm install
npm run sol:lint
unit_test_contracts:
executor: docker-node
working_directory: ~/project/implementation
steps:
- checkout
- run: sudo npm install -g [email protected]
- run:
name: Running testrpc
command: ganache-cli
background: true
- run:
name: Run NPM tests
working_directory: ~/project/implementation/contracts
command: npm install && npm run test
- checkout
- run: sudo npm install -g [email protected]
- run:
name: Running testrpc
command: ganache-cli
background: true
- run:
name: Authenticate GitHub Package Registry
command: echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc
- run:
name: Run NPM tests
command: npm install && npm run test
integration_test_contracts:
executor: docker-node
working_directory: ~/project/implementation
steps:
- checkout
- run: sudo npm install -g [email protected]
- run:
name: Running testrpc
command: ganache-cli
background: true
- run:
name: Deploy Uniswap
working_directory: ~/project/implementation/scripts
command: ./deploy_uniswap.sh
- run:
name: Run NPM tests
working_directory: ~/project/implementation/contracts
command: npm install && npm run integration-test
- checkout
- run: sudo npm install -g [email protected]
- run:
name: Running testrpc
command: ganache-cli
background: true
- run:
name: Authenticate GitHub Package Registry
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
command: npm install && npm run integration-test
generate_pngs:
docker:
- image: keepnetwork/texlive:15
Expand Down Expand Up @@ -208,21 +220,21 @@ jobs:
image: initcontainer-provision-tbtc-maintainers
tag: latest
publish_contract_data:
executor: gcp-cli/default
steps:
- attach_workspace:
at: /tmp/tbtc
- gcp-cli/install
- gcp-cli/initialize:
google-project-id: GOOGLE_PROJECT_ID
google-compute-zone: GOOGLE_COMPUTE_ZONE_A
# This param doesn't actually set anything, leaving here as a reminder to check when they fix it.
gcloud-service-key: GCLOUD_SERVICE_KEY
- run:
name: Upload contract data
command: |
cd /tmp/tbtc/contracts
gsutil -m cp * gs://keep-dev-contract-data/tbtc
executor: gcp-cli/default
steps:
- attach_workspace:
at: /tmp/tbtc
- gcp-cli/install
- gcp-cli/initialize:
google-project-id: GOOGLE_PROJECT_ID
google-compute-zone: GOOGLE_COMPUTE_ZONE_A
# This param doesn't actually set anything, leaving here as a reminder to check when they fix it.
gcloud-service-key: GCLOUD_SERVICE_KEY
- run:
name: Upload contract data
command: |
cd /tmp/tbtc/contracts
gsutil -m cp * gs://keep-dev-contract-data/tbtc
workflows:
version: 2
Expand Down

0 comments on commit 467a944

Please sign in to comment.