Skip to content

Commit 18ad5f0

Browse files
Anton KucherovAlekSi
Anton Kucherov
authored andcommitted
PMM-4236 Improve coverage speed. (percona#149)
1 parent c264afc commit 18ad5f0

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

.travis.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
dist: trusty
2-
sudo: required
1+
dist: xenial
32
language: go
43

5-
stages:
6-
- build
7-
- test
8-
- deploy
4+
services:
5+
- docker
96

107
go:
11-
- 1.11.x
128
- 1.12.x
9+
# - TODO master
1310

1411
matrix:
1512
allow_failures:
1613
- go: master
1714

15+
stages:
16+
- build
17+
- test
18+
- deploy
19+
1820
env:
1921
global:
2022
- TMPDIR=/tmp
@@ -29,9 +31,6 @@ env:
2931
- MONGODB_IMAGE=percona/percona-server-mongodb:3.6
3032
- MONGODB_IMAGE=percona/percona-server-mongodb:4.0
3133

32-
services:
33-
- docker
34-
3534
script: make test-all
3635

3736
jobs:
@@ -48,7 +47,10 @@ jobs:
4847
on:
4948
tags: true
5049

51-
after_success: bash <(curl -s https://codecov.io/bash) -X fix
50+
after_success:
51+
- curl https://codecov.io/bash > codecov
52+
- chmod +x codecov
53+
- timeout --signal=KILL 10s ./codecov -X fix
5254

5355
notifications:
5456
slack:

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ export PMM_RELEASE_TIMESTAMP = $(shell date '+%s')
3939
export PMM_RELEASE_FULLCOMMIT = $(APP_REVISION)
4040
export PMM_RELEASE_BRANCH = $(TRAVIS_BRANCH)
4141

42-
all: clean format build test
42+
all: init clean format style build test-all
4343

4444
style:
4545
@echo ">> checking code style"
4646
@! gofmt -s -d $(shell find . -path ./vendor -prune -o -name '*.go' -print) | grep '^'
4747

48-
test: init mongo-db-in-docker
48+
test: mongo-db-in-docker
4949
@echo ">> running tests"
5050
go test -coverprofile=coverage.txt -short -v $(RACE) $(pkgs)
5151

52-
test-all: init mongo-db-in-docker
52+
test-all: mongo-db-in-docker
5353
@echo ">> running all tests"
5454
go test -coverprofile=coverage.txt -v $(RACE) $(pkgs)
5555

0 commit comments

Comments
 (0)