aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorAbhinav Gupta <mail@abhinavg.net>2023-10-21 16:59:14 -0700
committerGitHub <noreply@github.com>2023-10-21 16:59:14 -0700
commit4fe6763faf645568b2d1d3fe4cdcfcf6b12cf7e6 (patch)
treed823419085562ed0442d061ffdcb519ebdb410b7 /.github
parent5fbb57ed966154dc29730e0ce62824e1b577d8cb (diff)
downloadsally-4fe6763faf645568b2d1d3fe4cdcfcf6b12cf7e6.tar.gz
ci: Use golangci-lint for linting (#121)
Instead of hand-managing and running linters, use golangci-lint. Along with the golangci-lint defaults, enable a couple other linters we generally agree with. See also uber-go/zap#1323 for a similar change. As a result of this, we can: - Drop the dependabot for tools - Run the lint job in parallel with build/test - Simplify the Makefile
Diffstat (limited to '.github')
-rw-r--r--.github/dependabot.yml5
-rw-r--r--.github/workflows/go.yml26
2 files changed, 24 insertions, 7 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index a0787cc..eccc28d 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -5,11 +5,6 @@ updates:
schedule:
interval: "daily"
- - package-ecosystem: "gomod"
- directory: "/tools"
- schedule:
- interval: "daily"
-
- package-ecosystem: "github-actions"
directory: "/"
schedule:
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 9c644e1..9c46b19 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -23,8 +23,8 @@ jobs:
go-version: 1.21.x
cache: true
- - name: Lint
- run: make lint
+ - name: Build
+ run: make build
- name: Test
run: make cover
@@ -32,6 +32,28 @@ jobs:
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v3
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+ name: Check out repository
+ - uses: actions/setup-go@v4
+ name: Set up Go
+ with:
+ go-version: 1.21.x
+ cache: false # managed by golangci-lint
+
+ - uses: golangci/golangci-lint-action@v3
+ name: Install golangci-lint
+ with:
+ version: latest
+ args: --version # make lint will run the linter
+
+ - run: make lint
+ name: Lint
+
docker:
runs-on: ubuntu-latest
steps: