-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (28 loc) · 964 Bytes
/
Makefile
File metadata and controls
37 lines (28 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
SHELL := /bin/bash
GOFILES := $(shell find . -name '*.go' -not -path './vendor/*')
ACTIONLINT := $(shell command -v actionlint)
ACT := $(shell command -v act)
.PHONY: fmt vet test lint-workflows validate-workflows validate tools
fmt:
gofmt -w $(GOFILES)
vet:
go vet ./...
test:
go test ./...
lint-workflows:
ifndef ACTIONLINT
$(error actionlint not found. Install with: brew install actionlint || go install github.com/rhysd/actionlint/cmd/actionlint@latest)
endif
$(ACTIONLINT)
validate-workflows:
ifndef ACT
$(error act not found. Install with: brew install act || go install github.com/nektos/act@latest)
endif
$(ACT) pull_request --eventpath .github/testdata/pull_request.json --dryrun \
-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest \
--container-architecture linux/amd64
validate: fmt vet test lint-workflows validate-workflows
# Helper to show tool availability
tools:
@echo "actionlint: $(ACTIONLINT)"
@echo "act: $(ACT)"