Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
58 lines (52 loc) · 1.72 KB
/
Copy pathjustfile
File metadata and controls
58 lines (52 loc) · 1.72 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
set quiet
set script-interpreter := ["bash", "-euo", "pipefail"]
# List available recipes
default:
just --list
# Run lightweight, Nix-agnostic checks
check:
just --fmt --check
treefmt --quiet --fail-on-change
markdownlint-cli2 >/dev/null
ast-grep scan --error --report-style=short --globs '!microvm.nix/**'
tsc -p packages/pi/extensions/tsconfig.json
oxlint --type-aware --format=unix
ruff format --quiet --check --extend-exclude microvm.nix
ruff check --quiet --extend-exclude microvm.nix
basedpyright --threads=4 --warnings packages
# Run the CI suite, including full Nix validation
ci: check test
#!/usr/bin/env bash
set -euo pipefail
if ! command -v nix >/dev/null 2>&1; then
printf '%s\n' \
'Nix verification not run: nix is unavailable.' \
'Run outside the jail: nix flake check' >&2
exit 1
fi
nix flake check -L
# Apply the fixable variants of the check commands
fix:
oxlint --type-aware --format=unix --fix
markdownlint-cli2 --fix >/dev/null
treefmt --quiet
just --fmt
ruff format --quiet --extend-exclude microvm.nix
ruff check --quiet --fix --extend-exclude microvm.nix
# Run Node tests and Nix evaluation (requires nix)
test:
#!/usr/bin/env bash
set -euo pipefail
ast-grep test --skip-snapshot-tests
node --test "**/*.test.ts"
python3 -B -m unittest discover -s packages.bench.tests -p '*_test.py'
if ! command -v nix >/dev/null 2>&1; then
printf '%s\n' \
'Nix verification not run: nix is unavailable.' \
'Run outside the jail: nix flake check --no-build' >&2
exit 1
fi
nix flake check --no-build
# Run updater scripts
update:
./scripts/update.sh