cosmjs/.circleci/config.yml
2020-02-03 09:29:15 +01:00

102 lines
2.9 KiB
YAML

version: 2
workflows:
version: 2
workflow:
jobs:
- build
- lint
- faucet_docker
- test
jobs:
build:
docker:
- image: circleci/node:10
steps:
- checkout
- run:
name: Version information
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
- restore_cache:
name: Restore Yarn Package Cache
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
- save_cache:
name: Save Yarn Package Cache
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- run:
command: yarn build
test:
docker:
- image: circleci/node:10
steps:
- checkout
- run:
name: Version information
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
- run: # start early for less wait time below
command: ./projects/scripts/cosm/start.sh
background: true
- restore_cache:
name: Restore Yarn Package Cache
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
- save_cache:
name: Save Yarn Package Cache
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- run: # wait until cosm scripts have fully started
command: timeout 15 bash -c "until curl -s http://localhost:1317/node_info > /dev/null; do sleep 1; done
- run:
environment:
COSMOS_ENABLED: 1
command: yarn test
- run:
command: ./projects/scripts/cosm/stop.sh
lint:
docker:
- image: circleci/node:10
steps:
- checkout
- run:
name: Version information
command: echo "node $(node --version)"; echo "yarn $(yarn --version)"
- restore_cache:
name: Restore Yarn Package Cache
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
- save_cache:
name: Save Yarn Package Cache
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- run:
command: yarn lint
faucet_docker:
docker:
- image: circleci/node:10
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Build docker image
command: docker build -t cosmwasm/faucet:manual --file faucet.Dockerfile .
- run:
name: Test docker image
command: |
docker run --read-only --rm cosmwasm/faucet:manual help
docker run --read-only --rm cosmwasm/faucet:manual version