Skip to content

Commit 37e0dac

Browse files
authored
Merge pull request #195 from kolyshkin/golangci
ci: don't install private golangci-lint; bump to v2.4
2 parents 7e71ac0 + 3fc6e0e commit 37e0dac

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ jobs:
2121
# the cache key, and specifying multiple go.sums is not trivial
2222
# (see https://github.com/moby/sys/pull/160 for details).
2323
cache: false
24+
- name: Install golangci-lint
25+
uses: golangci/golangci-lint-action@v8
26+
with:
27+
version: v2.4
28+
# We don't need to run golangci-lint here yet, but
29+
# there's no way to avoid it, so run it on one module.
30+
working-directory: ./mountinfo
2431
- name: Set PACKAGES env
2532
if: ${{ matrix.go-version == '1.18.x' }}
2633
run: |

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
/_build/
21
/mount/go-local.*
32
coverage.txt

Makefile

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
PACKAGES ?= atomicwriter capability mountinfo mount reexec sequential signal symlink user userns
2-
BINDIR ?= _build/bin
32
CROSS ?= linux/arm linux/arm64 linux/ppc64le linux/s390x \
43
freebsd/amd64 openbsd/amd64 darwin/amd64 darwin/arm64 windows/amd64
54
SUDO ?= sudo -n
@@ -47,18 +46,14 @@ test-local:
4746
cd atomicwriter && go mod tidy $(MOD) && go test $(MOD) $(RUN_VIA_SUDO) -v .
4847
$(RM) atomicwriter/go-local.*
4948

49+
.PHONY: golangci-lint-version
50+
golangci-lint-version:
51+
golangci-lint version
52+
5053
.PHONY: lint
51-
lint: $(BINDIR)/golangci-lint
52-
lint: CMD=go mod download; ../$(BINDIR)/golangci-lint run
54+
lint: golangci-lint-version
55+
lint: CMD=go mod download; golangci-lint run
5356
lint: foreach
54-
lint:
55-
$(BINDIR)/golangci-lint version
56-
57-
$(BINDIR)/golangci-lint: $(BINDIR)
58-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(BINDIR) v2.0.2
59-
60-
$(BINDIR):
61-
mkdir -p $(BINDIR)
6257

6358
.PHONY: cross
6459
cross:

0 commit comments

Comments
 (0)