Skip to content

Commit

Permalink
workflows: switch to org-wide golangci-lint job
Browse files Browse the repository at this point in the history
Fetch it when needed for local runs.

Signed-off-by: Roman Khimov <[email protected]>
  • Loading branch information
roman-khimov committed Sep 10, 2024
1 parent 138e6f0 commit b483ae7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 92 deletions.
21 changes: 3 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,9 @@ on:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}

- uses: actions/setup-go@v5
with:
go-version-file: 'cmd/go.mod'
cache-dependency-path: cmd/go.sum

- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: latest
working-directory: cmd
uses: nspcc-dev/.github/.github/workflows/go-linter.yml@master
with:
workdir: cmd

codeql:
name: CodeQL
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.idea
.vscode
.golangci.yml
vendor
.docker/ir/out/*
!.docker/ir/out/.gitkeep
Expand Down
73 changes: 0 additions & 73 deletions .golangci.yml

This file was deleted.

9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ NEOBENCH_FROM_COUNT ?= 1
NEOBENCH_TO_COUNT ?= 1
MS_PER_BLOCK ?= 0

.PHONY: help
.PHONY: help lint

# Show this help prompt
help:
Expand All @@ -36,6 +36,13 @@ help:
start.SharpFourNodesGoRPC10wrk start.SharpFourNodesGoRPC30wrk start.SharpFourNodesGoRPC100wrk \
start.SharpFourNodesGoRPC25rate start.SharpFourNodesGoRPC50rate start.SharpFourNodesGoRPC60rate start.SharpFourNodesGoRPC300rate start.SharpFourNodesGoRPC1000rate

.golangci.yml:
wget -O $@ https://github.com/nspcc-dev/.github/raw/master/.golangci.yml

# Lint Go code
lint: .golangci.yml
@cd cmd && golangci-lint run --config ../$<

# Build all images
build: gen build.node.bench build.node.go build.node.sharp build.bench

Expand Down

0 comments on commit b483ae7

Please sign in to comment.