forked from pion/webrtc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (45 loc) · 1.71 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
language: c
branches:
only:
- master
cache:
directories:
- $HOME/.cache/go-build
- $HOME/gopath/pkg/mod
env:
- GO111MODULE=on
services:
- docker
install:
# Manually download and install Go 1.12 instead of using gimme.
# It looks like gimme Go causes some errors on go-test for Wasm.
- wget -O go.tar.gz https://dl.google.com/go/go1.13.linux-amd64.tar.gz
- tar -C ~ -xzf go.tar.gz
- rm go.tar.gz
- export GOROOT=~/go
- export PATH=$GOROOT/bin:$PATH
- go version
- go env
- go get -u github.com/matoous/godox
- GO111MODULE=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
# Install Node 11 (required for WASM tests)
- wget https://raw.githubusercontent.com/creationix/nvm/v0.31.0/nvm.sh -O ~/.nvm/nvm.sh
- source ~/.nvm/nvm.sh
- nvm install 11
- node --version
- npm i -g yarn
- yarn install
script:
- bash .github/assert-contributors.sh
- bash .github/lint-disallowed-functions-in-library.sh
- bash .github/lint-commit-message.sh
- bash .github/lint-filename.sh
- godox
- golangci-lint run --build-tags quic ./...
- cd examples && golangci-lint run --build-tags quic ./...
- cd ..
- rm -rf examples # Remove examples, no test coverage for them
- go test -tags quic -coverpkg=$(go list ./... | grep -v examples | tr '\n' ',') -coverprofile=cover.out -v -race -covermode=atomic ./...
- GOOS=js GOARCH=wasm go test -exec="./test-wasm/go_js_wasm_exec" -v .
- bash <(curl -s https://codecov.io/bash)
- docker run -e "GO111MODULE=on" -v $PWD:/go/src/github.com/hcm007/webrtc -w /go/src/github.com/hcm007/webrtc -it i386/golang:1.13-buster '/usr/local/go/bin/go' 'test' '-tags' 'quic' "-coverpkg=$(go list ./... | grep -v examples | tr '\n' ',')" '-v' './...'