-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
58 lines (53 loc) · 2.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
language: go
go:
- 1.20.x
addons:
apt:
update: true
packages:
- ruby
jobs:
include:
- name: "Coverage"
os: linux
dist: jammy
install:
- sudo gem install coveralls-lcov
- go install github.com/jandelgado/gcov2lcov@latest
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0
- go get ./...
script:
- go build -ldflags="-X main.Commit=$(git rev-parse HEAD)" cmd/koinos-block-store/main.go
- go test -v github.com/koinos/koinos-block-store/internal/bstore -coverprofile=coverage.out -coverpkg=./internal/bstore
- gcov2lcov -infile=coverage.out -outfile=coverage.info
- golangci-lint run ./...
after_success:
- coveralls-lcov --repo-token "$COVERALLS_REPO_TOKEN" --service-name travis-pro coverage.info
- name: "Docker and Integration Tests"
os: linux
dist: jammy
services:
- docker
env:
- TAG=`if [ $TRAVIS_BRANCH == "master" ]; then echo -n latest; else echo -n $TRAVIS_BRANCH; fi`
- BLOCK_STORE_TAG=$TAG
install:
- git clone https://github.com/koinos/koinos-integration-tests.git
- pushd koinos-integration-tests
- go get ./...
- popd
before_script:
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
- docker build . -t $TRAVIS_REPO_SLUG:$TAG
script:
- pushd koinos-integration-tests
- ./run.sh
after_success:
- |
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
docker push $TRAVIS_REPO_SLUG:$TAG
fi
notifications:
slack:
secure: t3PWiafiGOlcVub7v2EhP5WOHKNI6BEnw+WDeOBc+vmGEvBiXtVmNd0pR0bkNPQo+hLj2qjjxcwRYeN5OnbDVHs3nO/c3mlUdiqlnYYFCjtX6TYeOkOKZGSDAoMRgzovzQsY3fBU22Gh4V+0eZUXDeyxlc/ZgNHmOkjGHwAHL9mvGDxfMUlmr9WhHHqd4q82JVm1Oo2OWYag4FEBtkOs93cCym89CaXIiQJDb5ddhcPFBk/H9C6WJyMts8UASXiEqdP8o7rNVo+JQkK9MrXhUyXVKvOTaeJM17Z+glAH4OZpghZ66kAuxwYvtxIWIOpQ2OJdMqoZWpNtcnT+3xPtpwHV8LhLljPdIP2+IMxRGM8xH5bOOHg9AfwHKewTZDtmOx5JO3OKnV931ft/7HhdGG/cIXtBDxYFG+yTWQk1n6iHW5D/W945lyxXtBAgvDnf83/SR2WrK0t8TTAKAnBcLI0Ad0wpWOAHV9gzkNLYMgjIHTuOY0fyMRtIS+XuWoR1G2OeU46g3lyNAlrkbxIEc1jdlejqo42Ql/H8Qoqs25vWTfyTEZhxI9+6ANlKopnWjloNcE9a9hcqmQAjvCNR3Q+xXE9ygbShWYpFJFgKJZxEAtGxjHOL4O9cUONg8tsAekZaV/gquVRtiRCaC1sr1rNV4K9F5hTSdcyom9IkzXs=
on_success: never