Add toggle for skipping tests
This commit is contained in:
1 parent
b45f138ff1
commit
a9db631836
6 files changed
+44
-29
No files matched your search
@@ -2,16 +2,21 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
echo "SKIP_TESTS=1" > "$STATE"
|
||||||
|
|
||||||
source "$STATE"
|
source "$STATE"
|
||||||
|
|
||||||
sudo apt-get -q update && sudo apt-get -q install bc jq
|
sudo apt-get -q update && sudo apt-get -q install bc jq
|
||||||
bin/setup-circleci-secrets "$SECRET_PASSWORD"
|
bin/setup-circleci-secrets "$SECRET_PASSWORD"
|
||||||
mkdir -p $(dirname $SRCDIR) && cp -r $(pwd)/ $SRCDIR
|
mkdir -p $(dirname $SRCDIR) && cp -r $(pwd)/ $SRCDIR
|
||||||
cd $SRCDIR; git submodule update --init
|
|
||||||
if [ "$CIRCLE_NODE_INDEX" = "0" ] ; then
|
if [ -z "$SKIP_TESTS" ] ; then
|
||||||
cd $SRCDIR/test; ./gce.sh make_template
|
cd $SRCDIR; git submodule update --init
|
||||||
|
if [ "$CIRCLE_NODE_INDEX" = "0" ] ; then
|
||||||
|
cd $SRCDIR/test; ./gce.sh make_template
|
||||||
|
fi
|
||||||
|
cd $SRCDIR/build
|
||||||
|
../tools/rebuild-image weaveworks/weavebuild . Dockerfile build.sh
|
||||||
|
touch $SRCDIR/.build.uptodate
|
||||||
|
sudo chown -R ubuntu /usr/local/go
|
||||||
fi
|
fi
|
||||||
cd $SRCDIR/build
|
|
||||||
../tools/rebuild-image weaveworks/weavebuild . Dockerfile build.sh
|
|
||||||
touch $SRCDIR/.build.uptodate
|
|
||||||
sudo chown -R ubuntu /usr/local/go
|
|
||||||
@@ -4,10 +4,12 @@ set -e
|
|||||||
|
|
||||||
source "$STATE"
|
source "$STATE"
|
||||||
|
|
||||||
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
|
if [ -z "$SKIP_TESTS" ] ; then
|
||||||
cd $SRCDIR
|
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
|
||||||
make clean-bin
|
cd $SRCDIR
|
||||||
make publish
|
make clean-bin
|
||||||
|
make publish
|
||||||
|
fi
|
||||||
|
|
||||||
go get github.com/weaveworks/wordepress
|
go get github.com/weaveworks/wordepress
|
||||||
cd /home/ubuntu/src/github.com/weaveworks/wordepress
|
cd /home/ubuntu/src/github.com/weaveworks/wordepress
|
||||||
|
|||||||
@@ -4,8 +4,10 @@ set -e
|
|||||||
|
|
||||||
source "$STATE"
|
source "$STATE"
|
||||||
|
|
||||||
if [ "$CIRCLE_NODE_INDEX" = "0" ] ; then
|
if [ -z "$SKIP_TESTS" ] ; then
|
||||||
go get github.com/mattn/goveralls
|
if [ "$CIRCLE_NODE_INDEX" = "0" ] ; then
|
||||||
goveralls -repotoken $COVERALLS_REPO_TOKEN -coverprofile=$SRCDIR/test/profile.cov -service=circleci
|
go get github.com/mattn/goveralls
|
||||||
cd $SRCDIR/test; cp coverage.* $CIRCLE_ARTIFACTS
|
goveralls -repotoken $COVERALLS_REPO_TOKEN -coverprofile=$SRCDIR/test/profile.cov -service=circleci
|
||||||
|
cd $SRCDIR/test; cp coverage.* $CIRCLE_ARTIFACTS
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -4,7 +4,9 @@ set -e
|
|||||||
|
|
||||||
source "$STATE"
|
source "$STATE"
|
||||||
|
|
||||||
cd $SRCDIR/test
|
if [ -z "$SKIP_TESTS" ] ; then
|
||||||
eval $(./gce.sh hosts)
|
cd $SRCDIR/test
|
||||||
export COVERAGE=true
|
eval $(./gce.sh hosts)
|
||||||
./run_all.sh
|
export COVERAGE=true
|
||||||
|
./run_all.sh
|
||||||
|
fi
|
||||||
@@ -4,6 +4,8 @@ set -e
|
|||||||
|
|
||||||
source "$STATE"
|
source "$STATE"
|
||||||
|
|
||||||
cd $SRCDIR/test
|
if [ -z "$SKIP_TESTS" ] ; then
|
||||||
./gce.sh destroy
|
cd $SRCDIR/test
|
||||||
test "$CIRCLE_NODE_INDEX" != "0" || (cd $SRCDIR/test; ./gen_coverage_reports.sh)
|
./gce.sh destroy
|
||||||
|
test "$CIRCLE_NODE_INDEX" != "0" || (cd $SRCDIR/test; ./gen_coverage_reports.sh)
|
||||||
|
fi
|
||||||
+9
-7
@@ -4,11 +4,13 @@ set -e
|
|||||||
|
|
||||||
source "$STATE"
|
source "$STATE"
|
||||||
|
|
||||||
cd $SRCDIR
|
if [ -z "$SKIP_TESTS" ] ; then
|
||||||
make lint
|
cd $SRCDIR
|
||||||
COVERDIR=test/coverage make RM= tests
|
make lint
|
||||||
make COVERAGE=true RM= all
|
COVERDIR=test/coverage make RM= tests
|
||||||
make testrunner
|
make COVERAGE=true RM= all
|
||||||
|
make testrunner
|
||||||
|
|
||||||
cd $SRCDIR/test
|
cd $SRCDIR/test
|
||||||
./gce.sh setup && eval $(./gce.sh hosts) && ./setup.sh
|
./gce.sh setup && eval $(./gce.sh hosts) && ./setup.sh
|
||||||
|
fi
|
||||||
Reference in new issue
Block a user