Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
61 lines (52 loc) · 1.47 KB
/
Copy pathTaskfile.yml
File metadata and controls
61 lines (52 loc) · 1.47 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
version: "3"
output: "group"
vars:
BUILD_DIR: dist
GOLANGCI_LINT: github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.10.1
GORELEASER: github.com/goreleaser/goreleaser/v2@v2.13.3
GOLANGCI_LINT_CMD: '{{if .CI}}golangci-lint{{else}}go run {{.GOLANGCI_LINT}}{{end}}'
GORELEASER_CMD: '{{if .CI}}goreleaser{{else}}go run {{.GORELEASER}}{{end}}'
tasks:
default:
cmds:
- task: build
build:
cmds:
- task: clean
- task: node:build
- '{{.GORELEASER_CMD}} build --clean --snapshot'
node:build:
dir: integrations/node
env:
NODE_OPTIONS: ""
cmds:
- pnpm install --frozen-lockfile
- node build.mjs
- mkdir -p ../../internal/nodeproxy/embed
- cp dist/proxy.mjs ../../internal/nodeproxy/embed/proxy.mjs
- cp dist/proxy.cjs ../../internal/nodeproxy/embed/proxy.cjs
golib:test:
dir: integrations/go
cmds:
- go test -race ./...
golib:lint:
dir: integrations/go
cmds:
- '{{.GOLANGCI_LINT_CMD}} run'
clean:
cmds:
- rm -rf {{.BUILD_DIR}}/*
test:
cmds:
- task: clean
- task: node:build
- mkdir -p {{.BUILD_DIR}}
- go test -v -race -coverprofile=./{{.BUILD_DIR}}/coverage.out ./...
- go tool cover -html=./{{.BUILD_DIR}}/coverage.out -o ./{{.BUILD_DIR}}/coverage.html
- task: golib:test
lint:
cmds:
- task: node:build
- '{{.GOLANGCI_LINT_CMD}} version'
- '{{.GOLANGCI_LINT_CMD}} run'
- task: golib:lint