-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
87 lines (83 loc) · 1.87 KB
/
Taskfile.yml
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
# https://taskfile.dev
# These are the helper commands used for managing/testing the repo.
version: "3"
vars:
BIN: "{{.ROOT_DIR}}/bin"
tasks:
default:
cmd: task --list
silent: true
ci:full:
desc: Run CI locally in containers
cmd: act
sources:
- ./**/*
ci:
desc: Run CI locally
aliases: [ci:local]
deps: [audit, fmt, test, clippy, build]
nix:ci:
desc: Run CI locally under nix
aliases: [ci:local]
deps: [nix:check, nix:fmt, nix:build]
nix:check:
desc: Run Nix CI checks
sources:
- ./**/*
cmds:
- nix flake check
nix:build:
desc: Build with Nix
cmds:
- nix build
clippy:
desc: Run clippy
sources:
- ./**/*.rs
cmd: cargo clippy
nix:fmt:
desc: Run all formatters using treefmt
cmds:
- nix fmt
fmt:
desc: Run all formatters
sources:
- ./**/*
cmds:
- cargo fmt
- alejandra .
- prettier --write .
test:
desc: Run all tests
aliases: [t]
sources:
- ./**/*.rs
cmd: cargo nextest run --no-default-features
audit:
desc: Run cargo security audit
sources:
- Cargo.lock
- flake.lock
cmd: cargo audit
build:
desc: Build the project
aliases: [b]
sources:
- ./**/*.rs
- ./Cargo*
cmd: cargo build
commit:
desc: Commit changes using custom script
cmd: "{{.BIN}}/commit.sh"
test:full:
desc: Run comparisons against official tools
cmd: "{{.BIN}}/test.sh {{.CLI_ARGS}}"
coverage:
desc: Run coverage
aliases: [cov]
# Many tools don't like the file references from `nix build .#coverage`, so we need to run this outside nix
cmd: cargo tarpaulin --skip-clean --include-tests --output-dir coverage --out lcov --no-default-features
nix:coverage:
desc: Create coverage using nix
cmds:
- nix build .#coverage --out-link coverage