-
Notifications
You must be signed in to change notification settings - Fork 1
/
devbox.json
51 lines (51 loc) · 1.78 KB
/
devbox.json
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
{
"env": {
"DEVBOX_SHARE_DIR": "$PWD/.devbox/nix/profile/default/share",
"NETSKOPE_CERT_PATH": "/Library/Application Support/Netskope/STAgent/data/nscacert.pem"
},
"packages": [
"bats",
"bats.libraries.bats-assert",
"bats.libraries.bats-support",
"nixpkgs-fmt",
"statix",
"shellcheck",
"shfmt",
"nodePackages.prettier"
],
"shell": {
"scripts": {
"lint": [
"nixpkgs-fmt --check . &",
"statix check --ignore .devbox &",
"shellcheck **/*.{sh,bats} &",
"shfmt --diff **/*.{sh,bats} &",
"prettier . --check &",
"wait"
],
"lint:fix": [
"nixpkgs-fmt .",
"statix fix --ignore .devbox",
"shfmt --write **/*.{sh,bats}",
"prettier . --write"
],
"test": [
"devbox run test-bash",
"devbox run test-zsh",
"devbox run test-fish"
],
"test-bash": [
"docker build -t bootstrap-script-test --build-arg NETSKOPE_CERT=\"$(cat \"$NETSKOPE_CERT_PATH\")\" --build-arg SHELL_VAR=bash -f ./bootstrap-test.Dockerfile .",
"docker run bootstrap-script-test bats test/bootstrap-agnostic.bats test/bootstrap-bash.bats"
],
"test-zsh": [
"docker build -t bootstrap-script-test --build-arg NETSKOPE_CERT=\"$(cat \"$NETSKOPE_CERT_PATH\")\" --build-arg SHELL_VAR=zsh -f ./bootstrap-test.Dockerfile .",
"docker run bootstrap-script-test bats test/bootstrap-agnostic.bats test/bootstrap-zsh.bats"
],
"test-fish": [
"docker build -t bootstrap-script-test --build-arg NETSKOPE_CERT=\"$(cat \"$NETSKOPE_CERT_PATH\")\" --build-arg SHELL_VAR=fish -f ./bootstrap-test.Dockerfile .",
"docker run bootstrap-script-test bats test/bootstrap-agnostic.bats test/bootstrap-fish.bats"
]
}
}
}