Add build-pr github actions workflow

Signed-off-by: Josh Dolitsky <josh@dolit.ski>
This commit is contained in:
Josh Dolitsky 2021-07-07 10:53:35 -05:00
parent 21251378b4
commit 2f63045f25
No known key found for this signature in database
GPG key ID: B2B93673243A65FB

26
.github/workflows/build-pr.yml vendored Normal file
View file

@ -0,0 +1,26 @@
name: build-pr
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: '1.16'
- name: Install golangci-lint
run: |
curl -sSL https://github.com/golangci/golangci-lint/releases/download/v$GOLANGCI_LINT_VERSION/golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz | tar xz
sudo mv golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64/golangci-lint /usr/local/bin/golangci-lint
rm -rf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64
env:
GOLANGCI_LINT_VERSION: '1.36.0'
- name: Test style
run: make test-style
- name: Run unit tests
run: make test-coverage