-
-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathMakefile
57 lines (48 loc) · 1.08 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
55
56
57
#!/usr/bin/env make
.PHONY: all
all: lint test
# Install Python 3.10 first
.PHONY: install
install:
poetry install
poetry run pre-commit install --install-hooks
.PHONY: clean
clean:
poetry env remove
.PHONY: update
update:
poetry update
poetry run pre-commit autoupdate
# If local, make sure TAILSCALE_CI_KEY env var is set.
# This is automatically populated in a GitHub Codespace.
.PHONY: test
test:
ifndef TAILSCALE_CI_KEY
$(error TAILSCALE_CI_KEY is not set)
else
poetry run molecule test --parallel --all
endif
.PHONY: test-default
test-default:
ifndef TAILSCALE_CI_KEY
$(error TAILSCALE_CI_KEY is not set)
else
poetry run molecule test --parallel --scenario-name default
endif
.PHONY: test-idempotent-up
test-idempotent-up:
ifndef TAILSCALE_CI_KEY
$(error TAILSCALE_CI_KEY is not set)
else
poetry run molecule test --parallel --scenario-name idempotent-up
endif
.PHONY: test-absent
test-absent:
ifndef TAILSCALE_CI_KEY
$(error TAILSCALE_CI_KEY is not set)
else
poetry run molecule test --parallel --scenario-name state-absent
endif
.PHONY: lint
lint:
poetry run ansible-lint