harbor/tests/travis/ut_run.sh
Yan 002e5a2b70
Enable api tests in travis (#5900)
This commit is to enable parallel run jobs with travis, and add API for DB and API for LDAP in travis.

Signed-off-by: wang yan <wangyan@vmware.com>
2018-09-19 17:49:43 +08:00

19 lines
620 B
Bash
Executable File

#!/bin/bash
set -e
export POSTGRESQL_HOST=$1
export REGISTRY_URL=$1:5000
export CHROME_BIN=chromium-browser
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
cd ./src/portal && npm run lint && npm run lint:lib && npm run test && cd -
sudo docker-compose -f ./make/docker-compose.test.yml up -d
sleep 10
./tests/pushimage.sh
docker ps
go test -race -i ./src/core ./src/adminserver ./src/jobservice
sudo -E env "PATH=$PATH" "POSTGRES_MIGRATION_SCRIPTS_PATH=/home/travis/gopath/src/github.com/goharbor/harbor/make/migrations/postgresql/" ./tests/coverage4gotest.sh
goveralls -coverprofile=profile.cov -service=travis-ci