-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
62 lines (57 loc) · 2.7 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
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-p2p/main.go
- go test -v github.com/koinos/koinos-p2p/internal -coverprofile=internal.out -coverpkg=./internal/...
- go test -v github.com/koinos/koinos-p2p/internal/node -coverprofile=node.out -coverpkg=./internal/...
- go test -v github.com/koinos/koinos-p2p/internal/p2p -coverprofile=p2p.out -coverpkg=./internal/...
- gcov2lcov -infile=internal.out -outfile=internal.info
- gcov2lcov -infile=node.out -outfile=node.info
- gcov2lcov -infile=p2p.out -outfile=p2p.info
- golangci-lint run --timeout=4m ./...
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`
- P2P_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: uLagb4g9pgxtO6pa+ReiRLXdAwSLv39W4BUi5/5Ury27JGZn2zobPhOcsGglbGwH2QTGomoTLJ4VU/wWLnYSrb5lRYhRYBgpmi0BVIqXrCDGEa7QWIlwtM9sY5nrSGB3CqsUZh0M/5etTJkcD281VVQ1qiowWIykKrkcN73WqGssJJqRU/Gu2eyqDmWar7ymDrKSjsmQw0nFGJwhDTrFIg9F6h81OaHsEk+A0A8V6ldZ2FcucKJGeta6hnh1UUKBnHitj0FUMIBW+lxKqm86Y3U1RFAKYS7GIBnQLdhpH2x5I36+kkGFgp1ZUg4KRy59Fh3D75HF4yxA4jp94cTPUAxSufYH+kcC9b2KCbKuCNeHlpMf1sHD3BxEFD7kRERjvSSzIl2Je4DgUO8eiqruMBe5GPkoQ8QQkzi0Kh02+mCx5G8IfiivRrgjvVGFl8+IXokIEeeTCYrZT7qeO1hashro/CDXFx318sPcA4FYQ9ToDhuWuKiLFyPYO3wua78nyQCZlX1x7FQrgEBc6MFfMAwi+aiGU+pu9t7gmcnLIOO2yuOpkksanIIVZ9jaTmJOdw3L0hWmK1dnNhHha3gJydydNA41bLHkoAHaOKTb3rxf4MkSLpiUQeoBkT9PUabxS56J3bd+2sn5DipQ3SsjXrtM1LurBxsiUb11F1y/sdE=
on_success: never