mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-04 15:17:02 +00:00
run CI tests in docker container
This commit is contained in:
+5
-6
@@ -1,8 +1,7 @@
|
||||
# Pull base image.
|
||||
FROM golang:1.5
|
||||
|
||||
COPY test/test_libs.sh /
|
||||
COPY glide.lock /glide.lock
|
||||
|
||||
ENV GLIDE /glide.lock
|
||||
FROM golang:1.6
|
||||
|
||||
ENV TENDERMINT_ORG $GOPATH/src/github.com/tendermint/
|
||||
RUN mkdir -p $TENDERMINT_ORG
|
||||
COPY . $TENDERMINT_ORG/tendermint
|
||||
WORKDIR $TENDERMINT_ORG/tendermint
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#! /bin/bash
|
||||
|
||||
echo `pwd`
|
||||
|
||||
BRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||
echo "Current branch: $BRANCH"
|
||||
|
||||
make get_vendor_deps
|
||||
|
||||
make test_race
|
||||
|
||||
if [[ "$BRANCH" == "master" || "$BRANCH" == "staging" ]]; then
|
||||
bash test/test_libs.sh
|
||||
fi
|
||||
+9
-11
@@ -1,14 +1,12 @@
|
||||
#! /bin/bash
|
||||
|
||||
# integrations test!
|
||||
# if we pushed to STAGING or MASTER,
|
||||
# run the integrations tests.
|
||||
|
||||
BRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||
echo "Current branch: $BRANCH"
|
||||
|
||||
if [[ "$BRANCH" == "master" || "$BRANCH" == "staging" ]]; then
|
||||
docker build -t tester -f ./test/Dockerfile .
|
||||
docker run -t tester bash /test_libs.sh
|
||||
fi
|
||||
# integrations test
|
||||
# this is the script run by eg CircleCI.
|
||||
# It creates a docker container,
|
||||
# installs the dependencies,
|
||||
# and runs the tests.
|
||||
# If we pushed to STAGING or MASTER,
|
||||
# it will also run the tests for all dependencies
|
||||
|
||||
docker build -t tester -f ./test/Dockerfile .
|
||||
docker run -t tester bash test/run_test.sh
|
||||
|
||||
Reference in New Issue
Block a user