]> Sergey Matveev's repositories - btrtrc.git/blob - .github/workflows/go.yml
Run Go GitHub action with Go 1.16 as well as 1.17
[btrtrc.git] / .github / workflows / go.yml
1 name: Go
2
3 on: [push, pull_request]
4
5 jobs:
6
7   build:
8     timeout-minutes: 30
9     runs-on: ubuntu-latest
10     strategy:
11       matrix:
12         go-version: [ '1.16', '1.17' ]
13     steps:
14     - uses: actions/checkout@v2
15
16     - name: Set up Go
17       uses: actions/setup-go@v2
18       with:
19         go-version: ${{ matrix.go-version }}
20
21     - name: Test
22       run: go test -race -count 2 -bench . ./...
23
24     - name: Bench
25       run: go test -run @ -bench . ./...
26
27     - name: Test on 386
28       run: GOARCH=386 go test ./... -bench .
29       continue-on-error: true
30
31     - name: Some packages compile for WebAssembly
32       run: GOOS=js GOARCH=wasm go build . ./storage ./tracker/...
33
34     - name: Install godo
35       run: go install github.com/anacrolix/godo@latest
36
37     - name: Apt packages
38       run: sudo apt install pv fuse
39
40     - name: torrentfs end-to-end test
41       run: fs/test.sh
42       timeout-minutes: 10