2
0
mirror of synced 2025-02-23 06:08:07 +00:00
Matt Joiner 125d7f0e90
Create go.yml (#497)
* Create go.yml

* Go version 1.16

* Add benchmarks

* Match CircleCI test coverage

* Add 15 minute timeout

* Don't log to file

* Download modules in separate step, minimize test runs

* Install godo before running torrentfs end-to-end test

* More fixes

* More fixes for GitHub Actions CI
2021-06-07 12:44:51 +10:00

47 lines
835 B
YAML

name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Download Go modules
run: go mod download
- name: Build
run: go build ./...
- name: Test
run: go test -race ./...
- name: Bench
run: go test -run @ -bench . ./...
- name: Test on 386
run: GOARCH=386 go test ./... -bench .
continue-on-error: true
- 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