From 42df6b639ee5b57134564b5f9d82212ef1942309 Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Mon, 11 May 2020 17:56:43 +0200 Subject: [PATCH] add GitHub Actions test and build and linter run --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e56894b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: build + +on: + push: + branches: + tags: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: set up go 1.14 + uses: actions/setup-go@v1 + with: + go-version: 1.14 + id: go + + - name: checkout + uses: actions/checkout@v2 + + - name: build and test + run: | + go test -timeout=60s -race + go build -race + + - name: install golangci-lint + run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $GITHUB_WORKSPACE v1.26.0 + + - name: run golangci-lint + run: $GITHUB_WORKSPACE/golangci-lint run --out-format=github-actions