-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
44 lines (32 loc) · 1.4 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
dist: xenial
language: go
go:
- 1.15.x
git:
depth: 1
install: true
notifications:
email: false
before_script:
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.32.1
- go install github.com/onsi/ginkgo/ginkgo # installs the ginkgo CLI
- go install github.com/onsi/gomega/... # fetches the matcher library
- golangci-lint --version
- golangci-lint run --config=.golangci-lint.yaml # run a bunch of code checkers/linters in parallel
- ginkgo -r --randomizeAllSpecs --randomizeSuites --failOnPending --cover --trace --race --progress
script:
- docker login -u $DOCKER_USER -p $DOCKER_PASS
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo "staging" ; fi`
- GOOS=linux go build
- export docker_repo=smartatransit/scrapedumper
- export docker_build_directory=.
- export tags="build-${TRAVIS_BUILD_NUMBER},commit-${TRAVIS_COMMIT::8},$TAG"
- ./build_and_push_image.sh
- GOOS=linux go build -o ./postgres-reaper/postgres-reaper ./postgres-reaper/
- export docker_repo=smartatransit/scrapereaper
- export docker_build_directory=./postgres-reaper/
- export tags="build-${TRAVIS_BUILD_NUMBER},commit-${TRAVIS_COMMIT::8},$TAG"
- ./build_and_push_image.sh
after_success:
- touch coverage.txt; find . -name "*.coverprofile" | xargs -l cat >> coverage.txt
- curl -s https://codecov.io/bash | bash -