-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
54 lines (41 loc) · 1.22 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
MAKEFLAGS = -rR --warn-unused-variables
ARGS ?=
.PHONY: test
test:
env NOMAD_NAMESPACE= NOMAD_TOKEN= pytest -v tests/unit
vagrant_test:
vagrant up
vagrant ssh -- -t 'cd /app && ./integration_tests.sh $(ARGS)'
vagrant_destroy:
vagrant destroy -f
lint: pyright pylava ruff
pyright:
pyright src/ tests/ $(ARGS)
pylava:
pylava src/ tests/ $(ARGS)
ruff:
ruff check src/ tests/ $(ARGS)
integration_tests:
./integration_tests.sh $(ARGS)
paralell_integration_tests:
./integration_tests.sh -n auto $(ARGS)
importtime:
python -X importtime -c 'import nomad_tools.entrypoint' 2>build/importtime.log
tuna build/importtime.log
try_docker_integration_test:
docker build --target integration -f ./tests/Dockerfile.integration_test -t tmp .
docker run --network=host --privileged -ti --rm tmp \
bash -xeuc ' \
dockerd & \
./tests/provision.sh nomad_start & \
sleep 10 && \
./integration_tests.sh \
'
run_githubrunner_locally:
. ./.env && nomaddtools githubrunner -c ./deploy/githubrunner.yml $(ARGS) run
run_githubrunner:
. ./.env && nomadtools watch run \
-var GITHUB_TOKEN=$$GITHUB_TOKEN \
-var NOMAD_TOKEN=$$NOMAD_TOKEN \
-var NOMAD_NAMESPACE=$$NOMAD_NAMESPACE \
./deploy/nomadtools-githubrunner.nomad.hcl