1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
---
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/setup-go@v2
- name: Add Go bin directory to path
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Install golint
run: go get -u golang.org/x/lint/golint
- uses: pre-commit/action@v2.0.0
test:
strategy:
matrix:
go-version:
- 1.13.x
- 1.14.x
- 1.15.x
- 1.16.x
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: test
run: go test ./...
|