Add GitHub workflows

This commit is contained in:
Christian Rocha 2021-07-09 15:02:10 -04:00
parent 3512b536b2
commit 25d8790040
No known key found for this signature in database
GPG Key ID: D6CC7A16E5878018
2 changed files with 49 additions and 0 deletions

30
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
go-version: [~1.16, ^1]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
GO111MODULE: "on"
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Download Go modules
run: go mod download
- name: Build
run: go build -v ./...
- name: Test
run: go test ./...

19
.github/workflows/lint.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: lint
on: [push, pull_request]
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Optional: golangci-lint command line arguments.
args: --issues-exit-code=0
# Optional: working directory, useful for monorepos
# working-directory: somedir
# Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true