Skip to content

Instantly share code, notes, and snippets.

@vikin91
Created June 12, 2020 08:41
Show Gist options
  • Save vikin91/9239b6db98660415369968cb778e87d5 to your computer and use it in GitHub Desktop.
Save vikin91/9239b6db98660415369968cb778e87d5 to your computer and use it in GitHub Desktop.
Linting and testing in Github Workflow for Golang
name: Build and test Go
on: [push]
jobs:
lint:
name: runner / golangci-lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v1
with:
github_token: ${{ secrets.github_token }}
test:
strategy:
matrix:
go-version: [1.12.x, 1.13.x, 1.14.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: make test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment