-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (29 loc) · 1.11 KB
/
Makefile
File metadata and controls
43 lines (29 loc) · 1.11 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
40
41
42
43
ARGS ?= $(filter-out $@,$(MAKECMDGOALS))
COMPOSE_FILE ?= docker-compose.test.yml
COMPOSE_SERVICE ?= ash-dynamo-test-container
.PHONY: test test.watch compose check quality coverage format credo hex-outdated hex-audit unused-deps FORCE
test: compose
@mix test $(ARGS)
test.watch: compose
@mix test.watch $(ARGS)
compose:
@docker compose -f $(COMPOSE_FILE) up -d $(COMPOSE_SERVICE) >/dev/null 2>&1 || true
check: quality coverage ## Runs quality and coverage checks.
quality: format credo hex-outdated hex-audit unused-deps ## Runs quality checks.
coverage: compose ## Runs ExUnit with coverage and trace.
@mix test --cover --trace
format: ## Checks code formatting.
@mix format --check-formatted
credo: ## Runs Credo static analysis.
@mix credo --strict
hex-outdated: ## Checks for outdated dependencies.
@mix hex.outdated || true
hex-audit: ## Audits dependencies for security vulnerabilities.
@mix hex.audit
unused-deps: ## Checks for unused dependencies.
@mix deps.unlock --check-unused
# Allow patterns like `make test test/my_test.exs` without make treating the
# file as a real target.
%: FORCE
@:
FORCE: