-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
96 lines (74 loc) · 2.06 KB
/
justfile
File metadata and controls
96 lines (74 loc) · 2.06 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Firefly Forage development tasks
# Default recipe - show available commands
default:
@just --list
# Build forage-ctl with nix
build:
nix build .#forage-ctl
# Run all Go tests
test:
@just packages/forage-ctl/test
# Run Go tests with verbose output
test-v:
@just packages/forage-ctl/test-v
# Run a specific test package
test-pkg pkg:
@just packages/forage-ctl/test-pkg {{pkg}}
# Run docker integration tests (requires docker daemon)
test-docker:
@just packages/forage-ctl/test-docker
# Run all Go tests including docker integration
test-all:
@just packages/forage-ctl/test-all
# Run NixOS VM integration test (uses actual nixosModule, Linux only)
test-vm:
nix build .#checks.$(nix eval --raw --impure --expr 'builtins.currentSystem').vm-integration
# Run E2E tests in a QEMU VM (full sandbox lifecycle, Linux only, KVM recommended)
test-e2e:
nix run .#e2e-driver
# Run E2E tests against the current machine (post-deployment sanity check)
test-e2e-local:
E2E_LOCAL=1 go test -tags=e2e -v -timeout=15m ./packages/forage-ctl/e2e/
# Format all code
fmt:
nix fmt -- .
@just packages/forage-ctl/fmt
# Run Go linter
lint:
@just packages/forage-ctl/lint
# Fix Go linter issues
lint-fix:
@just packages/forage-ctl/lint-fix
# Build documentation
docs:
nix build .#docs
# Serve documentation locally
docs-serve:
cd docs && mdbook serve
# Check everything (fmt, lint, test, build, e2e)
check: fmt lint test build _check-e2e
# Run E2E tests if the system is eligible (Linux + KVM), skip otherwise
[linux]
_check-e2e:
#!/usr/bin/env bash
if [[ ! -e /dev/kvm ]]; then
echo "Skipping E2E tests: /dev/kvm not available"
exit 0
fi
just test-e2e
[macos]
_check-e2e:
@echo "Skipping E2E tests: not supported on macOS"
[windows]
_check-e2e:
@echo "Skipping E2E tests: not supported on Windows"
# Clean build artifacts
clean:
rm -rf result
@just packages/forage-ctl/clean
# Update Go dependencies
update-deps:
@just packages/forage-ctl/update-deps
# Show flake outputs
outputs:
nix flake show