mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 21:31:23 +00:00
ci: Move over abci-cli tests
This commit is contained in:
@ -79,6 +79,36 @@ jobs:
|
|||||||
export PATH="$GOBIN:$PATH"
|
export PATH="$GOBIN:$PATH"
|
||||||
make metalinter
|
make metalinter
|
||||||
|
|
||||||
|
test_abci_apps:
|
||||||
|
<<: *defaults
|
||||||
|
steps:
|
||||||
|
- attach_workspace:
|
||||||
|
at: /tmp/workspace
|
||||||
|
- restore_cache:
|
||||||
|
key: v2-pkg-cache
|
||||||
|
- restore_cache:
|
||||||
|
key: v2-tree-{{ .Environment.CIRCLE_SHA1 }}
|
||||||
|
- run:
|
||||||
|
name: Run abci apps tests
|
||||||
|
command: |
|
||||||
|
export PATH="$GOBIN:$PATH"
|
||||||
|
bash abci/tests/test_app/test.sh
|
||||||
|
|
||||||
|
test_abci_cli:
|
||||||
|
<<: *defaults
|
||||||
|
steps:
|
||||||
|
- attach_workspace:
|
||||||
|
at: /tmp/workspace
|
||||||
|
- restore_cache:
|
||||||
|
key: v2-pkg-cache
|
||||||
|
- restore_cache:
|
||||||
|
key: v2-tree-{{ .Environment.CIRCLE_SHA1 }}
|
||||||
|
- run:
|
||||||
|
name: Run abci-cli tests
|
||||||
|
command: |
|
||||||
|
export PATH="$GOBIN:$PATH"
|
||||||
|
bash abci/tests/test_cli/test.sh
|
||||||
|
|
||||||
test_apps:
|
test_apps:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
steps:
|
steps:
|
||||||
@ -172,6 +202,12 @@ workflows:
|
|||||||
- lint:
|
- lint:
|
||||||
requires:
|
requires:
|
||||||
- setup_dependencies
|
- setup_dependencies
|
||||||
|
- test_abci_apps:
|
||||||
|
requires:
|
||||||
|
- setup_dependencies
|
||||||
|
- test_abci_cli:
|
||||||
|
requires:
|
||||||
|
- setup_dependencies
|
||||||
- test_apps:
|
- test_apps:
|
||||||
requires:
|
requires:
|
||||||
- setup_dependencies
|
- setup_dependencies
|
||||||
|
@ -1,139 +0,0 @@
|
|||||||
version: 2
|
|
||||||
|
|
||||||
defaults: &defaults
|
|
||||||
working_directory: /go/src/github.com/tendermint/abci
|
|
||||||
docker:
|
|
||||||
- image: circleci/golang:1.10.0
|
|
||||||
environment:
|
|
||||||
GOBIN: /tmp/workspace/bin
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
setup_dependencies:
|
|
||||||
<<: *defaults
|
|
||||||
steps:
|
|
||||||
- run: mkdir -p /tmp/workspace/bin
|
|
||||||
- run: mkdir -p /tmp/workspace/profiles
|
|
||||||
- checkout
|
|
||||||
- restore_cache:
|
|
||||||
keys:
|
|
||||||
- v1-pkg-cache
|
|
||||||
- run:
|
|
||||||
name: tools
|
|
||||||
command: |
|
|
||||||
export PATH="$GOBIN:$PATH"
|
|
||||||
make get_tools
|
|
||||||
- run:
|
|
||||||
name: dependencies
|
|
||||||
command: |
|
|
||||||
export PATH="$GOBIN:$PATH"
|
|
||||||
make get_vendor_deps
|
|
||||||
- run:
|
|
||||||
name: binaries
|
|
||||||
command: |
|
|
||||||
export PATH="$GOBIN:$PATH"
|
|
||||||
make install
|
|
||||||
- persist_to_workspace:
|
|
||||||
root: /tmp/workspace
|
|
||||||
paths:
|
|
||||||
- bin
|
|
||||||
- profiles
|
|
||||||
- save_cache:
|
|
||||||
key: v1-pkg-cache
|
|
||||||
paths:
|
|
||||||
- /go/pkg
|
|
||||||
- save_cache:
|
|
||||||
key: v1-tree-{{ .Environment.CIRCLE_SHA1 }}
|
|
||||||
paths:
|
|
||||||
- /go/src/github.com/tendermint/abci
|
|
||||||
|
|
||||||
test_apps:
|
|
||||||
<<: *defaults
|
|
||||||
steps:
|
|
||||||
- attach_workspace:
|
|
||||||
at: /tmp/workspace
|
|
||||||
- restore_cache:
|
|
||||||
key: v1-pkg-cache
|
|
||||||
- restore_cache:
|
|
||||||
key: v1-tree-{{ .Environment.CIRCLE_SHA1 }}
|
|
||||||
- run:
|
|
||||||
name: Run apps tests
|
|
||||||
command: |
|
|
||||||
export PATH="$GOBIN:$PATH"
|
|
||||||
bash tests/test_app/test.sh
|
|
||||||
|
|
||||||
# XXX: if this test fails, fix it and update the docs at:
|
|
||||||
# https://github.com/tendermint/tendermint/blob/develop/docs/abci-cli.rst
|
|
||||||
test_cli:
|
|
||||||
<<: *defaults
|
|
||||||
steps:
|
|
||||||
- attach_workspace:
|
|
||||||
at: /tmp/workspace
|
|
||||||
- restore_cache:
|
|
||||||
key: v1-pkg-cache
|
|
||||||
- restore_cache:
|
|
||||||
key: v1-tree-{{ .Environment.CIRCLE_SHA1 }}
|
|
||||||
- run:
|
|
||||||
name: Run cli tests
|
|
||||||
command: |
|
|
||||||
export PATH="$GOBIN:$PATH"
|
|
||||||
bash tests/test_cli/test.sh
|
|
||||||
|
|
||||||
test_cover:
|
|
||||||
<<: *defaults
|
|
||||||
parallelism: 4
|
|
||||||
steps:
|
|
||||||
- attach_workspace:
|
|
||||||
at: /tmp/workspace
|
|
||||||
- restore_cache:
|
|
||||||
key: v1-pkg-cache
|
|
||||||
- restore_cache:
|
|
||||||
key: v1-tree-{{ .Environment.CIRCLE_SHA1 }}
|
|
||||||
- run:
|
|
||||||
name: Run test cover
|
|
||||||
command: |
|
|
||||||
for pkg in $(go list github.com/tendermint/abci/... | grep -v /vendor/ | circleci tests split --split-by=timings); do
|
|
||||||
id=$(basename "$pkg")
|
|
||||||
go test -timeout 5m -race -coverprofile=/tmp/workspace/profiles/$id.out -covermode=atomic "$pkg"
|
|
||||||
done
|
|
||||||
- persist_to_workspace:
|
|
||||||
root: /tmp/workspace
|
|
||||||
paths:
|
|
||||||
- "profiles/*"
|
|
||||||
|
|
||||||
upload_coverage:
|
|
||||||
<<: *defaults
|
|
||||||
steps:
|
|
||||||
- attach_workspace:
|
|
||||||
at: /tmp/workspace
|
|
||||||
- restore_cache:
|
|
||||||
key: v1-tree-{{ .Environment.CIRCLE_SHA1 }}
|
|
||||||
- run:
|
|
||||||
name: gather
|
|
||||||
command: |
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
echo "mode: atomic" > coverage.txt
|
|
||||||
for prof in $(ls /tmp/workspace/profiles/); do
|
|
||||||
tail -n +2 /tmp/workspace/profiles/"$prof" >> coverage.txt
|
|
||||||
done
|
|
||||||
- run:
|
|
||||||
name: upload
|
|
||||||
command: bash <(curl -s https://codecov.io/bash) -f coverage.txt
|
|
||||||
|
|
||||||
workflows:
|
|
||||||
version: 2
|
|
||||||
test-suite:
|
|
||||||
jobs:
|
|
||||||
- setup_dependencies
|
|
||||||
- test_cover:
|
|
||||||
requires:
|
|
||||||
- setup_dependencies
|
|
||||||
- test_apps:
|
|
||||||
requires:
|
|
||||||
- setup_dependencies
|
|
||||||
- test_cli:
|
|
||||||
requires:
|
|
||||||
- setup_dependencies
|
|
||||||
- upload_coverage:
|
|
||||||
requires:
|
|
||||||
- test_cover
|
|
Reference in New Issue
Block a user