Skip to content

Commit

Permalink
foo
Browse files Browse the repository at this point in the history
  • Loading branch information
dieswaytoofast committed Sep 18, 2017
1 parent f00a9c4 commit 0cf7e8d
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 7 deletions.
61 changes: 57 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
name: Load Docker image layer cache
command: |
set +o pipefail
docker load -i /images/enterprise-wallet.tar | true
docker load -i ~/images/enterprise-wallet.tar | true
# start factomd and wait for it to start
Expand All @@ -48,13 +48,63 @@ jobs:
- run:
name: Save the image cache
command: |
mkdir -p /images
docker save -o /images/enterprise-wallet.tar enterprise-wallet $(docker history -q enterprise-wallet |grep -v missing | grep -v none)
mkdir -p ~/images
docker save -o ~/images/enterprise-wallet.tar enterprise-wallet $(docker history -q enterprise-wallet |grep -v missing | grep -v none)
- save_cache:
key: v1-enterprise-wallet-test-cache-{{ checksum "glide.lock" }}
paths:
- /images
- ~/images

coveralls:
working_directory: /go/src/github.com/FactomProject/enterprise-wallet
docker:
- image: circleci/golang:1.9

steps:
- checkout

- setup_remote_docker:
version: 17.06.0-ce

# The main (only) thing we care about is caching the /vendor dir.
# Hence, checksumming glide.lock
- restore_cache:
keys:
- v1-enterprise-wallet-test-cache-{{ checksum "glide.lock" }}

# Load the image if the cache hit
- run:
name: Load Docker image layer cache
command: |
set +o pipefail
docker load -i ~/images/enterprise-wallet.tar | true
# start factomd and wait for it to start
- run: |
docker run --rm -d --name factomd factominc/factomd -blktime 60 -sim_stdin=false -customnet=ff_dev -network=CUSTOM -startdelay=10
sleep 11
# build enterprise-wallet
- run: |
docker build -t enterprise-wallet .
# Run enterprise-wallet
- run: |
docker run --rm -d --network container:factomd --name enterprise-wallet enterprise-wallet -factomdlocation http://localhost:8088
sleep 2
# Get Goveralls
- run: |
docker exec -it enterprise-wallet /bin/sh -c 'go get github.com/mattn/goveralls'
# Run Goveralls
- run: |
docker exec -it enterprise-wallet /bin/sh -c 'goveralls -v -ignore=$(paste -sd, .coverignore) -service=circle-ci' -repotoken=$COVERALLS_TOKEN
# The flow is
# build
Expand All @@ -71,3 +121,6 @@ workflows:
build:
jobs:
- build
- coveralls:
requires:
- build
3 changes: 0 additions & 3 deletions .circleci/foo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ jobs:
name: Get goveralls
command: |
go get github.com/mattn/goveralls
cd $GOPATH/src/github.com/Masterminds/glide
git checkout tags/v0.12.3
go install
- run:
name: Get the dependencies
Expand Down

0 comments on commit 0cf7e8d

Please sign in to comment.