-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
43 lines (34 loc) · 1.23 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
# Travis configuration for etl parser.
#
# etl parser is a Go project with release automation through Cloud Build.
#
# The travis-ci.com configuration performs unit and integration tests, and code
# coverage only.
dist: jammy # 22.04
language: go
go:
- 1.20
env:
- PATH=$PATH:$HOME/gopath/bin
before_install:
- echo Branch is ${TRAVIS_BRANCH} and Tag is ${TRAVIS_TAG}
# Install coverage tools.
- go install github.com/mattn/goveralls@latest
- go install github.com/wadey/gocovmerge@latest
# Install gcloud, for integration tests.
- $TRAVIS_BUILD_DIR/travis/install_gcloud.sh
- source "${HOME}/google-cloud-sdk/path.bash.inc"
install:
# Get dependencies for repo and integration tests.
- cd $TRAVIS_BUILD_DIR
- go get -v -t ./...
- go get -v -t -tags=integration ./...
script:
# Run all unit tests that do not require service account credentials.
- go test -v -coverprofile=_unit.cov ./...
# Run all integration tests that DO require service account credentials.
# Note: we do not run integration tests from forked PRs b/c the SA is unavailable.
- ./integration-testing.sh
# Report coverage statistics to coveralls.io
- $HOME/gopath/bin/gocovmerge *.cov > merge.cov
- $HOME/gopath/bin/goveralls -coverprofile=merge.cov -service=travis-pro || true