From 843ad5a3100eb7ef2737132e6f7178e686aa3398 Mon Sep 17 00:00:00 2001 From: Felix Puchinger Date: Mon, 20 Nov 2023 15:11:17 +0100 Subject: [PATCH] ci: Add nilaway and golangci lint --- .github/workflows/golangci-lint.yml | 27 +++++++++++++++++++++++++++ .github/workflows/nilaway.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 .github/workflows/golangci-lint.yml create mode 100644 .github/workflows/nilaway.yml diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 0000000..404490d --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -0,0 +1,27 @@ +name: golangci-lint +on: + push: + branches: + tags: + pull_request: + +permissions: + contents: read + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-go@v4 + with: + go-version: '1.21' + cache: false + + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.54.2 + args: generator/... go/... diff --git a/.github/workflows/nilaway.yml b/.github/workflows/nilaway.yml new file mode 100644 index 0000000..81370d2 --- /dev/null +++ b/.github/workflows/nilaway.yml @@ -0,0 +1,27 @@ +name: nilaway +on: + push: + branches: + tags: + pull_request: + +permissions: + contents: read + +jobs: + nilaway: + name: nilaway + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-go@v4 + with: + go-version: '1.21' + cache: false + + - name: nilaway + run: | + go install go.uber.org/nilaway/cmd/nilaway@latest + nilaway -exclude-errors-in-files "vendor/" ./generator/... + nilaway -exclude-errors-in-files "vendor/" ./go/...