]> Sergey Matveev's repositories - btrtrc.git/blob - .github/workflows/go.yml
Merge branch 'master' into squirrel
[btrtrc.git] / .github / workflows / go.yml
1 name: Go
2
3 on:
4   push:
5     branches: [ master ]
6   pull_request:
7     branches: [ master ]
8
9 jobs:
10
11   build:
12     timeout-minutes: 30
13     runs-on: ubuntu-latest
14     steps:
15     - uses: actions/checkout@v2
16
17     - name: Set up Go
18       uses: actions/setup-go@v2
19       with:
20         go-version: 1.17
21
22     - name: Download Go modules
23       run: go mod download
24
25     - name: Build
26       run: go build ./...
27
28     - name: Test
29       run: go test -race ./...
30
31     - name: Bench
32       run: go test -run @ -bench . ./...
33
34     - name: Test on 386
35       run: GOARCH=386 go test ./... -bench .
36       continue-on-error: true
37
38     - name: Some packages compile for WebAssembly
39       run: GOOS=js GOARCH=wasm go build . ./storage ./tracker/...
40
41     - name: Install godo
42       run: go install github.com/anacrolix/godo@latest
43
44     - name: Apt packages
45       run: sudo apt install pv fuse
46
47     - name: torrentfs end-to-end test
48       run: fs/test.sh
49       timeout-minutes: 10