-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
88 lines (74 loc) · 2.7 KB
/
Copy pathTaskfile.yml
File metadata and controls
88 lines (74 loc) · 2.7 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
version: "3"
# pipefail: without this, `go test | tee` always exits 0 (tee's exit code)
# even when tests fail, silently masking failures. Must be set here in the
# root Taskfile — Taskfile v3 silently ignores file-level `set:` in included
# taskfiles (.taskfiles/*.yml).
set: [pipefail]
silent: true
env:
# Let go.mod's `toolchain` directive auto-download the pinned Go
# version. Red Hat's RPM-packaged Go defaults to GOTOOLCHAIN=local,
# which blocks this.
GOTOOLCHAIN: auto
# When FIPS=1 (e.g., `task build FIPS=1`), all Go commands use
# GOEXPERIMENT=boringcrypto for FIPS-validated cryptography.
GOEXPERIMENT: '{{if eq .FIPS "1"}}boringcrypto{{end}}'
# Gomega test parallelism: 1 in CI, CPUs-1 otherwise
GOMEGA_PROCS:
sh: 'if [ -n "$CI" ]; then echo 1; else echo $(($(nproc 2>/dev/null || echo 2) - 1)); fi'
includes:
dev:
taskfile: .taskfiles/dev.yml
test:
taskfile: .taskfiles/test.yml
vars:
MODULE: github.com/complytime-labs/crosscodex
BUILD_DIR: "{{.ROOT_DIR}}/.build"
TEST_DIR: "{{.ROOT_DIR}}/.test-output"
FIPS: '{{.FIPS | default ""}}'
GINKGOLEAF_FORMAT: '{{.GINKGOLEAF_FORMAT | default "jest"}}'
OLLAMA_HOST:
sh: |
host='{{.OLLAMA_HOST | default "http://localhost:11434"}}'
case "$host" in http://*|https://*) echo "$host" ;; *) echo "http://$host" ;; esac
OLLAMA_CHAT_MODEL: '{{.OLLAMA_CHAT_MODEL | default "llama3.2:1b"}}'
OLLAMA_EMBED_MODEL: '{{.OLLAMA_EMBED_MODEL | default "granite-embedding:30m"}}'
tasks:
default:
silent: true
cmds:
- |
echo "Global variables (pass to any task):"
echo " FIPS=1 Enable FIPS mode (GOEXPERIMENT=boringcrypto)"
echo " OLLAMA_HOST=http://host:port Override Ollama base URL (default: http://localhost:11434)"
echo " OLLAMA_CHAT_MODEL=name Override Ollama chat model (default: llama3.2:1b)"
echo " OLLAMA_EMBED_MODEL=name Override Ollama embedding model (default: granite-embedding:30m)"
echo " GINKGOLEAF_FORMAT=format Test output format: jest, tree, github, markdown, etc. (default: jest)"
echo ""
- task --list 2>/dev/null
generate:
desc: "Alias for dev:generate"
cmds:
- task: dev:generate
build:
desc: "Alias for dev:build"
cmds:
- task: dev:build
test:
desc: "Alias for test:unit"
cmds:
- task: test:unit
lint:
desc: "Alias for dev:lint"
cmds:
- task: dev:lint
check:
desc: Run all quality gates
deps: [lint, test]
clean:
desc: Remove build artifacts and test output
cmds:
- rm -rf {{.BUILD_DIR}}
- rm -rf {{.TEST_DIR}}
- rm -rf api/gen
- rm -rf megalinter-reports