-
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (32 loc) · 1.07 KB
/
Makefile
File metadata and controls
39 lines (32 loc) · 1.07 KB
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
38
39
export CGO_ENABLED=0
.PHONY: lint
lint:
golangci-lint run --config=./.github/linters/.golangci.yml --fix
.PHONY: spell-lint
spell-lint:
docker run \
--interactive --tty --rm \
--volume "$(CURDIR):/workdir" \
--workdir "/workdir" \
python:3.14-slim bash -c "python -m pip install --upgrade pip && pip install 'codespell>=2.4.1' && codespell"
.PHONY: docs-lint
docs-lint:
docker run \
--interactive --tty --rm \
--volume "$(CURDIR):/workdir" \
--workdir "/workdir" \
node:lts-alpine sh -c 'npm install --global --production --update-notifier=false markdownlint-cli@0.45.0 && markdownlint *.md -c .github/linters/.markdown-lint.yml'
.PHONY: deps-up
deps-up:
docker compose up --detach --wait
docker compose port postgres 5432
.PHONY: deps-down
deps-down:
docker compose down --volumes --remove-orphans
.PHONY: .test
.test:
PG_HOST=$$(docker compose port postgres 5432) && \
TEST_POSTGRES="postgres://test:test@$$PG_HOST/test?sslmode=disable" \
go test -timeout 2m -cover -coverprofile=coverage.txt -covermode=atomic ./...
.PHONY: test
test: deps-up .test deps-down