-
Notifications
You must be signed in to change notification settings - Fork 25
/
Makefile
54 lines (40 loc) · 1.14 KB
/
Makefile
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
44
45
46
47
48
49
50
51
52
53
54
# Introspection targets
# ---------------------
.PHONY: help
help: targets
.PHONY: targets
targets:
@echo "\033[34mTargets\033[0m"
@echo "\033[34m---------------------------------------------------------------\033[0m"
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-22s\033[0m %s\n", $$1, $$2}'
# Build targets
# -------------
.PHONY: dependencies
dependencies: dependencies-mix ## Install dependencies required by the application
.PHONY: dependencies-mix
dependencies-mix:
mix deps.get --force
# CI targets
# ----------
.PHONY: lint
lint: lint-compile lint-format lint-credo ## Run lint tools on the code
.PHONY: lint-compile
lint-compile:
mix compile --warnings-as-errors --force
.PHONY: lint-format
lint-format:
mix format --dry-run --check-formatted
.PHONY: lint-credo
lint-credo:
mix credo --strict
.PHONY: test
test: ## Run the test suite
mix test
.PHONY: test-coverage
test-coverage: ## Generate the code coverage report
mix coveralls
.PHONY: format
format: format-elixir ## Run formatting tools on the code
.PHONY: format-elixir
format-elixir:
mix format