-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaskfile.yml
More file actions
90 lines (71 loc) · 2.66 KB
/
taskfile.yml
File metadata and controls
90 lines (71 loc) · 2.66 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
# https://taskfile.dev
version: "3"
vars:
GREETING: Hello, these are Inference Go tasks!
dotenv:
- .env
tasks:
default:
cmds:
- echo "{{.GREETING}}"
silent: true
installtools:
cmds:
# Install task, go, golangci-lint, cloc externally. E.g via asdf. the needed versions are pinned in .tool-versions file.
- go install golang.org/x/tools/gopls@v0.21.1
- go install github.com/oligot/go-mod-upgrade@v0.12.0
- go install github.com/kisielk/godepgraph@v1.0.0
- go install github.com/ppipada/refdir@v0.7.0
- go install github.com/vladopajic/go-test-coverage/v2@v2.18.3
cloc:
cmds:
- |
cloc --vcs=git --ignored=ignored.txt \
--force-lang=Mustache,tmpl --force-lang=INI,env --force-lang=INI,dev --force-lang=INI,prod \
--exclude_ext=yaml,sum,mod,md5 --not-match-f='LICENSE$|\.gitignore$' \
.
checkupgrade:
cmds:
- gomajor list
- go-mod-upgrade -l
godepgraph:
cmds:
- godepgraph -s -o github.com/flexigpt/inference-go,command-line-arguments provider_set.go | dot -Tpng -o godepgraph.png
tagstats:
cmds:
- ./scripts/git_tag_stats.sh
lint-gopls:
cmds:
- ./scripts/lint_gopls_check.sh
lint-godotfix:
cmds:
- golangci-lint run --fix --enable-only=godot
lint-gosort:
cmds:
- refdir ./...
lint:
cmds:
- golangci-lint run ./... -v
test:anthropic:
cmds:
- go test -count=1 -v ./internal/integration -run '^(Example_anthropic_basicConversation|Example_anthropic_toolsAndThinkingStreaming|Example_anthropic_functionToolRoundTrip)$'
test:openaichat:
cmds:
- go test -count=1 -v ./internal/integration -run '^(Example_openAIChat_basicConversation|Example_openAIChat_toolsAndJSONSchema)$'
test:openairesponses:
cmds:
- go test -count=1 -v ./internal/integration -run '^(Example_openAIResponses_basicConversation|Example_openAIResponses_toolsAndAttachments)$'
test:google:
cmds:
- go test -count=1 -v ./internal/integration -run '^(Example_googleGenerateContent_basicConversation|Example_googleGenerateContent_functionToolRoundTrip|Example_googleGenerateContent_webSearchAndThinkingStreaming|TestGoogleGenerateContent_FunctionToolRoundTripLoop)$'
test:
cmds:
# The count=1 is needed to disable test caching. this is so that coverage doesnt show stale data.
# Issue: https://github.com/golang/go/issues/74873
- go test -count=1 -covermode=atomic -coverpkg=./... -coverprofile=coverage.out ./...
- go tool cover -func=coverage.out
- go-test-coverage --config=./.testcoverage.yml
lt:
cmds:
- task: lint
- task: test