forked from coder/websocket
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
40 lines (36 loc) · 1004 Bytes
/
.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
language: go
go: 1.x
dist: bionic
env:
global:
- SHFMT_URL=https://github.com/mvdan/sh/releases/download/v3.0.1/shfmt_v3.0.1_linux_amd64
- GOFLAGS="-mod=readonly"
jobs:
include:
- name: Format
before_script:
- sudo apt-get install -y npm
- sudo npm install -g prettier
- sudo curl -L "$SHFMT_URL" > /usr/local/bin/shfmt && sudo chmod +x /usr/local/bin/shfmt
- go get golang.org/x/tools/cmd/stringer
- go get golang.org/x/tools/cmd/goimports
script: make -j16 fmt
- name: Lint
before_script:
- sudo apt-get install -y shellcheck
- go get golang.org/x/lint/golint
script: make -j16 lint
- name: Test
before_script:
- sudo apt-get install -y chromium-browser
- go get github.com/agnivade/wasmbrowsertest
- go get github.com/mattn/goveralls
script: make -j16 test
addons:
apt:
update: true
cache:
npm: true
directories:
- ~/.cache
- ~/gopath/pkg