From 2f63045f259c98187b61b00529895117c05bb02f Mon Sep 17 00:00:00 2001 From: Josh Dolitsky Date: Wed, 7 Jul 2021 10:53:35 -0500 Subject: [PATCH] Add build-pr github actions workflow Signed-off-by: Josh Dolitsky --- .github/workflows/build-pr.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/build-pr.yml diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml new file mode 100644 index 000000000..ecb85f62e --- /dev/null +++ b/.github/workflows/build-pr.yml @@ -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