Skip to content

Commit

Permalink
Add Go workflow (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
klauspost committed Jun 29, 2021
1 parent c6a3519 commit 93795d9
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Go

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
strategy:
matrix:
go-version: [1.14.x, 1.15.x, 1.16.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Vet
run: go vet ./...

- name: Test
run: go test ./...

- name: Test Noasm
run: go test -tags=noasm ./...

build-special:
env:
CGO_ENABLED: 0
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x

- name: Checkout code
uses: actions/checkout@v2

- name: fmt
run: diff <(gofmt -d .) <(printf "")

- name: Test 386
run: GOOS=linux GOARCH=386 go test -short ./...

- name: goreleaser deprecation
run: curl -sfL https://git.io/goreleaser | VERSION=v0.162.0 sh -s -- check

- name: goreleaser snapshot
run: curl -sL https://git.io/goreleaser | VERSION=v0.162.0 sh -s -- --snapshot --skip-publish --rm-dist

0 comments on commit 93795d9

Please sign in to comment.