Commit 1791f686 authored by Steven Allen's avatar Steven Allen

ci: test the http clients

parent 93de7888
......@@ -120,7 +120,7 @@ jobs:
path: /tmp/circleci-artifacts
- store_artifacts:
path: /tmp/circleci-test-results
build-interop:
build:
docker:
- image: circleci/golang:1.12
<<: *defaults
......@@ -128,12 +128,18 @@ jobs:
- checkout
- *make_out_dirs
- *restore_gomod
- run: make build
- run: cp cmd/ipfs/ipfs /tmp/circleci-workspace
- run:
name: Building
command: make build
- run:
name: Storing
command: |
mkdir -p /tmp/circleci-workspace/bin
cp cmd/ipfs/ipfs /tmp/circleci-workspace/bin
- persist_to_workspace:
root: /tmp/circleci-workspace
paths:
- ipfs
- bin/ipfs
- *store_gomod
interop:
docker:
......@@ -148,13 +154,51 @@ jobs:
command: npm install
working_directory: ~/ipfs/go-ipfs/interop
environment:
IPFS_GO_EXEC: /tmp/circleci-workspace/ipfs
IPFS_GO_EXEC: /tmp/circleci-workspace/bin/ipfs
- run:
command: npm test
working_directory: ~/ipfs/go-ipfs/interop
environment:
IPFS_GO_EXEC: /tmp/circleci-workspace/ipfs
IPFS_GO_EXEC: /tmp/circleci-workspace/bin/ipfs
go-ipfs-api:
docker:
- image: circleci/golang:1.12
<<: *defaults
steps:
- *make_out_dirs
- attach_workspace:
at: /tmp/circleci-workspace
- run: git clone https://github.com/ipfs/go-ipfs-api.git
- run:
name: IPFS Daemon
command: /tmp/circleci-workspace/bin/ipfs daemon --init --enable-namesys-pubsub
background: true
- run:
name: Waiting for the daemon
no_output_timeout: 10s
command: |
while ! /tmp/circleci-workspace/bin/ipfs id --api=/ip4/127.0.0.1/tcp/5001 2>/dev/null; do
sleep 1
done
- run:
command: go test -v ./...
working_directory: ~/ipfs/go-ipfs/go-ipfs-api
go-ipfs-http-client:
docker:
- image: circleci/golang:1.12
<<: *defaults
steps:
- *make_out_dirs
- attach_workspace:
at: /tmp/circleci-workspace
- run: git clone https://github.com/ipfs/go-ipfs-http-client.git
- run:
command: |
export PATH=/tmp/circleci-workspace/bin:$PATH
go test -v ./...
working_directory: ~/ipfs/go-ipfs/go-ipfs-http-client
- run:
command: /tmp/circleci-workspace/bin/ipfs shutdown
workflows:
version: 2
......@@ -164,7 +208,13 @@ workflows:
- golint
- gotest
- sharness
- build-interop
- build
- interop:
requires:
- build-interop
- build
- go-ipfs-api:
requires:
- build
- go-ipfs-http-client:
requires:
- build
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment