-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (47 loc) · 1.25 KB
/
Makefile
File metadata and controls
65 lines (47 loc) · 1.25 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
RUNNER_ENV_FILE ?= .development.env
.PHONY: build run lint test
ifneq (,$(wildcard $(RUNNER_ENV_FILE)))
include $(RUNNER_ENV_FILE)
export $(shell sed 's/=.*//' $(RUNNER_ENV_FILE))
endif
link-development-env:
@ln -sf $(RUNNER_ENV_FILE) .env
build:
poetry run ./scripts/build.sh
stop-ajv:
@echo "Stopping AJV on port $(AJV_VALIDATOR_PORT)..."
@AJV_VALIDATOR_PORT=$(AJV_VALIDATOR_PORT) npm run stop
start-ajv: link-development-env
npm run start
run: start-ajv
poetry run python api.py
.PHONY: clean
clean: ## Clean the temporary files.
rm -rf .ruff_cache
rm -rf megalinter-reports
lint: lint-python
npm run lint
.PHONY: ruff
ruff: ## Run ruff linter code check.
poetry run ruff check .
.PHONY: black
black: ## Run black linter code check.
poetry run black --check .
lint-python:
poetry run ./scripts/run_lint_python.sh
test-python:
poetry run ./scripts/run_tests_python.sh
test-ajv:
npm run test
test: test-python test-ajv
format: format-python
npm run format
format-python:
poetry run isort .
poetry run black .
.PHONY: megalint
megalint: clean ## Run the MegaLinter.
docker run --platform linux/amd64 --rm \
-v /var/run/docker.sock:/var/run/docker.sock:rw \
-v $(shell pwd):/tmp/lint:rw \
ghcr.io/oxsecurity/megalinter-python:v9.4.0