forked from weaviate/weaviate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
93 lines (91 loc) · 7.43 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
addons:
hosts:
- db
# after_success is only used for Dockerhub and should run last.
after_success:
- |
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
# send to codecov.io
# unit tests
rm -f coverage.txt || true; mv coverage-unit.txt coverage.txt
bash <(curl -s https://codecov.io/bash) -F unittests
# unit tests
rm -f coverage.txt || true; mv coverage-integration.txt coverage.txt
bash <(curl -s https://codecov.io/bash) -F integration
rm coverage.txt
fi
- travis_wait 30 ./ci/push_docker.sh
before_install:
# install a newer docker version which supports buildx
- sudo rm -rf /var/lib/apt/lists/*
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) edge"
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- mkdir -vp ~/.docker/cli-plugins/
- curl --silent -L "https://github.com/docker/buildx/releases/download/v0.3.0/buildx-v0.3.0.linux-amd64" > ~/.docker/cli-plugins/docker-buildx
- chmod a+x ~/.docker/cli-plugins/docker-buildx
dist: bionic
go:
- "1.16.5"
env:
matrix:
# Force using modules.
- GO111MODULE=on
global:
# location of the open-api specs
- WEAVIATESCHEMAFILE=openapi-specs/schema.json
# how to autobump semver style
- SEMVERBUMPTYPE=patch
# secure values
- secure: QH/qM6TuOZtNnNY8aKZPYB8uya3IYNVchvfyX28Tq5Kwwfj9CZX/m9Hac7lP1xOZyKdKMT4PAwVxUEhtQENJfymckQCF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mF/ez2Ny0YRRdybNeC15g/NI3KjRl9IYWQTM7pe1GipEG4MeD1UdN0eTZJRXhPhXAG3cy2wZDI9vQiXXoOfRk28fLV+oRy8bjBR6j9JEc0iw=
- secure: lrXRmWTugnKOFFRV0GhJOpPDht4R/3dcr64Vziepkhe1YdWsvShifzElATKplrHwjXuJ6LRJesskrT2+isDrKKLGLLT/AtZ4j3SYqXCXgYtepkq5MV7YeAZbWoaNseSzX+bfGbz/Qc6unGsdEFzJm4300mCoub8Mi42spfcHKfu2eqTOaWEVExoo0P4q8VlomW5kuErQT37cMuDo+J9u1ornV79R16+hzTNs0EazpqwWIwblFOiCUygNsFusZso7fw3RQ/fJWtBP1gT9H5S2MY3PEKRWRqEiiEGTChnEegLgHb1nPgz0r2FrdGshaKMt2ZU1eyq91hFfUfIxbNoRfy3W5wZ9Sp88NsGWftSVrOEibnbkX1eIX34cMiAZGL5Nnz5SxRHTO4sEfWJi9aEvU4EeaO6zXffMR4JHaVHdp+1XwMY+qbfNo8TW7GKDiQFmJMvkn0zrcQVUEi+cUHO8TqsJezjEPuNYKd85IpFvQX3RqrRievmRIJX2/GP2FFy0PlyC4TLmQYd6ZCndQlTGsvxS+Ie5k5Zx7d2RT5bcSwcNE5ZtYuzAfzAl3B/IbB+/9tHEUJK508sl3SkDzTPDzqyttnnfVOVKSShLcWPuw5NMeK7Sdc3F9CBchD19+QZbOsrBCp0zQXboGfwVf3JugAJcKEDCWCSBtOTd1QKaNxA=
language: go
install:
# - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
# - chmod +x ./cc-test-reporter
- wget https://raw.githubusercontent.com/creativesoftwarefdn/semver-tool/master/src/semver
- chmod +x semver
before_script:
- sudo apt-get -qq -y update
- sudo apt-get -qq -y install jq coreutils
- |
# Login to dockerhub (if internal PR)
# This used to be part of the deploy step, but since dockerhub introduced rate limiting
# we now need to be logged in also for all pull steps, thus it is now at the beginning
# of the pipeline
if [ -n "$DOCKER_PASSWORD" ]; then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
else
echo "Cannot login to Dockerhub, as this is an external PR. There is a risk that the build will fail due to rate limiting"
fi
- |
if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
# build the build tools
./tools/gen-code-from-swagger.sh || travis_terminate 1
# check if anything is different
CHANGED=$(git status -s | wc -l)
echo "CHANGED is '$CHANGED'"
# push back to Git if changed
if [ "$CHANGED" -gt 0 ]; then
echo "There are changes, we need to do something"
git config credential.helper "store --file=.git/credentials"
echo "https://${GH_TOKEN}:@github.com" > .git/credentials
git add -A
git commit -m "🤖 bleep bloop => auto updated Weaviate"
git push origin HEAD:${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}
# exit 0 will trigger a new build
travis_terminate 0
fi
fi
# Verify that the code is properly formatted.
- if [[ -n "$(gofmt -l .)" ]]; then echo "The following files were not formatted properly!"; gofmt -l .; exit 1; fi
script:
- travis_wait 30 ./test/run.sh || travis_terminate 1
services:
- docker
sudo: required