From 7be575660e5e54732188446c361b63753844ea83 Mon Sep 17 00:00:00 2001 From: sudo pacman -Syu Date: Thu, 7 Jul 2022 02:21:53 -0700 Subject: [PATCH] Add github action and golangci-lint (#84) --- .github/workflows/go.yml | 35 +++++++++++++++++++++++++++++++++++ .golangci.yml | 5 +++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/go.yml create mode 100644 .golangci.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..141bc12 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,35 @@ +name: Go + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: "1.18" + check-latest: true + cache: true + - run: go test -race -failfast ./... + golangci-lint: + name: golangci-lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: "1.18" + check-latest: true + cache: true + - uses: golangci/golangci-lint-action@v3 + with: + version: latest diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..7929600 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,5 @@ +run: + tests: false + +output: + sort-results: true