forked from gonum/plot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (43 loc) · 1.45 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
sudo: true
dist: bionic
language: go
go_import_path: gonum.org/v1/plot
# Versions of go that are explicitly supported by gonum.
go:
- 1.16.x
- 1.15.x
- master
matrix:
fast_finish: true
allow_failures:
- go: master
env:
global:
- GO111MODULE: "on"
- EGL_PLATFORM: "x11"
- DISPLAY: ":99"
# Get coverage tools, and start the virtual framebuffer.
before_install:
- sudo apt-get update
- sudo apt-get install -qq pkg-config libwayland-dev libx11-dev libx11-xcb-dev libxkbcommon-dev libxkbcommon-x11-dev libgles2-mesa-dev libegl1-mesa-dev libffi-dev libxcursor-dev xvfb xdotool
- Xvfb :99 -screen 0 1920x1024x24 &
# Required for format check.
- go get golang.org/x/tools/cmd/goimports
# Required for imports check.
- go get gonum.org/v1/tools/cmd/check-imports
# Required for copyright header check.
- go get gonum.org/v1/tools/cmd/check-copyright
# Required for coverage.
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
# Get deps, build, test, and ensure the code is gofmt'ed.
# If we are building as gonum, then we have access to the coveralls api key, so we can run coverage as well.
script:
- ${TRAVIS_BUILD_DIR}/.travis/check-copyright.sh
- ${TRAVIS_BUILD_DIR}/.travis/check-formatting.sh
- go get -d -t -v ./...
- go build -v ./...
- go test -v ./...
- test -z "$(gofmt -d .)"
- if [[ $TRAVIS_SECURE_ENV_VARS = "true" ]]; then bash ./.travis/test-coverage.sh; fi
- ${TRAVIS_BUILD_DIR}/.travis/check-imports.sh