name: Go on: [push, pull_request] jobs: build: timeout-minutes: 30 runs-on: ubuntu-latest strategy: matrix: go-version: [ 'tip' ] fail-fast: false steps: - uses: actions/checkout@v2 - name: Set up Go if: matrix.go-version != 'tip' uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Install gotip if: matrix.go-version == 'tip' run: | git clone --depth=1 https://go.googlesource.com/go "$HOME/gotip" cd "$HOME/gotip/src" ./make.bash echo "GOROOT=$HOME/gotip" >> "$GITHUB_ENV" echo "$HOME/gotip/bin:$PATH" >> "$GITHUB_PATH" - name: Test run: go test -race -count 2 ./... - name: Test Benchmarks run: go test -race -run @ -bench . -benchtime 2x ./... - name: Bench run: go test -run @ -bench . ./... - name: Test on 386 run: GOARCH=386 go test ./... -bench . continue-on-error: true - name: Some packages compile for WebAssembly run: GOOS=js GOARCH=wasm go build . ./storage ./tracker/... - name: Install godo run: go install github.com/anacrolix/godo@latest - name: Apt packages run: sudo apt install pv fuse - name: torrentfs end-to-end test run: fs/test.sh timeout-minutes: 10