-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTiltfile.tests
65 lines (58 loc) · 1.84 KB
/
Tiltfile.tests
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
# For more on the `test_go` extension: https://github.com/tilt-dev/tilt-extensions/tree/master/tests/golang
# For more on tests in Tilt: https://docs.tilt.dev/tests_in_tilt.html
load('ext://tests/golang', 'test_go')
# these unit tests are fast/well cached, so it's easy to run them all whenever a file changes and get fast feedback
# (The `integration` tag prevents this test resource from running our very slow integration test suite)
test_go('go-unit-tests', '.', '.',
# extra_args=['-short'],
recursive=True,
labels=['test'],
ignore=[
'**/bin/app',
]
)
# note: local_resource runs on host. during `tilt ci` the infra is deployed and
# services can accessed by their forwarded ports on localhost.
#
# environment variables are set with dotenv (main tiltfile)
local_resource(
"go integration tests",
"just go-integration-test",
resource_deps=["minio", "rpc","graph"],
trigger_mode=TRIGGER_MODE_MANUAL,
auto_init=config.tilt_subcommand == "ci",
labels=["test"],
)
docker_build("k6-image", "k6/tests")
k8s_resource("k6",
new_name="k6 - api test",
trigger_mode=TRIGGER_MODE_MANUAL,
auto_init=False,
resource_deps=["api","rpc"],
links=[link("https://k6.io", "grafana k6")],
labels=["test"]
)
docker_build("k6-load-test-graph-image", "k6/load-test-graph")
k8s_resource("k6-load-test-graph",
new_name="k6 - load test graph",
trigger_mode=TRIGGER_MODE_MANUAL,
auto_init=False,
resource_deps=["graph", "faker"],
links=[link("https://k6.io", "grafana k6")],
labels=["test"]
)
docker_build("k6-simulate-traffic-image", "k6/simulate-traffic")
k8s_resource("k6-simulate-traffic",
new_name="k6 - simulate traffic",
trigger_mode=TRIGGER_MODE_MANUAL,
auto_init=False,
resource_deps=["graph"],
labels=["test"]
)
local_resource(
"ui tests",
"cd ui && npm test",
labels=["test"],
deps=["ui"],
ignore=["ui/coverage/**"],
)