Add CircleCI 2.0 turd
Adds tests for https://github.com/anacrolix/utp/issues/24, and mobile on the master branch. The UDP tracker test uses udp4 because of some bad behaviour on CircleCI.
This commit is contained in:
parent
eb32bb821a
commit
054ff25f7c
|
@ -0,0 +1,19 @@
|
|||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: circleci/golang:latest
|
||||
environment:
|
||||
PROJECT_GO_PACKAGE: github.com/anacrolix/torrent
|
||||
working_directory: /go/src/$PROJECT_GO_PACKAGE
|
||||
steps:
|
||||
- run: echo $PROJECT_GO_PACKAGE
|
||||
- checkout
|
||||
- run: sudo apt install fuse
|
||||
- run: go get -t -d -v -race $PROJECT_GO_PACKAGE/...
|
||||
- run: go test -v -race $PROJECT_GO_PACKAGE/...
|
||||
- run: CGO_ENABLED=0 go get -t -d -v $PROJECT_GO_PACKAGE/...
|
||||
- run: CGO_ENABLED=0 go test -v $PROJECT_GO_PACKAGE/...
|
||||
- run: go get golang.org/x/mobile/cmd/gomobile
|
||||
- run: gomobile init
|
||||
- run: gomobile build -target=android $PROJECT_GO_PACKAGE
|
|
@ -47,7 +47,7 @@ func TestMarshalAnnounceResponse(t *testing.T) {
|
|||
// Failure to write an entire packet to UDP is expected to given an error.
|
||||
func TestLongWriteUDP(t *testing.T) {
|
||||
t.Parallel()
|
||||
l, err := net.ListenUDP("udp", nil)
|
||||
l, err := net.ListenUDP("udp4", nil)
|
||||
defer l.Close()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
|
Loading…
Reference in New Issue