Repository navigation
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
65 lines (56 loc) · 2.75 KB
/
Copy pathTaskfile.yaml
File metadata and controls
65 lines (56 loc) · 2.75 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
version: '3'
# The plugin directories are generated: edit core/ and lang/<binding>/, then run
# `task generate` (Go), `task generate BINDING=generic`, `task generate
# BINDING=python` and `task generate BINDING=ts-react`, and commit all four. CI runs
# `task check`, `task lint-core`, `task docs:check` and `task test-gate`, plus the
# generator's tests and linter.
tasks:
generate:
desc: Render core/ + lang/<BINDING>/ into its plugin directory and, when the profile names one, its coding-rules handbook (BINDING=go; generic renders linter-driven-development/, python renders python-linter-driven-development/, ts-react renders ts-react-linter-driven-development/)
dir: tools/ldd-gen
vars:
BINDING: '{{.BINDING | default "go"}}'
cmds:
- go run . -root {{.ROOT_DIR}} -lang {{.BINDING}}
check:
desc: Fail when any plugin directory or coding-rules handbook on disk differs from its rendering
dir: tools/ldd-gen
cmds:
- go run . -root {{.ROOT_DIR}} -check
lint-core:
desc: Report language residue in core/, refresh the Residue section of core/README.md, fail on hard hits or a stale section
dir: tools/ldd-gen
cmds:
- go run . lint-core -root {{.ROOT_DIR}} -write
- |
git -C {{.ROOT_DIR}} diff --exit-code -- core/README.md \
|| { echo "lint-core - the Residue section of core/README.md was rewritten; commit it"; exit 1; }
test-gate:
desc: Run the fixture matrices of the generated scripts — the repo-brain gate and the review's detection pass — for every plugin
cmds:
- bash go-linter-driven-development/scripts/check-repo-brain_test.sh
- bash linter-driven-development/scripts/check-repo-brain_test.sh
- bash python-linter-driven-development/scripts/check-repo-brain_test.sh
- bash ts-react-linter-driven-development/scripts/check-repo-brain_test.sh
- bash go-linter-driven-development/scripts/ldd-detect_test.sh
- bash linter-driven-development/scripts/ldd-detect_test.sh
- bash python-linter-driven-development/scripts/ldd-detect_test.sh
- bash ts-react-linter-driven-development/scripts/ldd-detect_test.sh
test-gen:
desc: Unit tests and lint for the generator
dir: tools/ldd-gen
cmds:
- go test ./...
- golangci-lint run
test-scripts:
desc: Unit tests for the repository's own scripts (the spend report)
cmds:
- python3 scripts/spend-report_test.py
docs:check:
desc: Run the repo-brain documentation gate over this repository (pass --fix after --)
cmds:
- bash scripts/check-docs.sh {{.CLI_ARGS}}
evals:run:
desc: "Run the behavioral evals from buzzdan/ldd-evals against this checkout. Spends money. Vars after --: TIER= CAP= CASE="
cmds:
- bash scripts/evals.sh {{.CLI_ARGS}}