forked from incentro-ecx/go-commercelayer-sdk
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTaskfile.yml
47 lines (38 loc) · 987 Bytes
/
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
version: '3'
tasks:
generate:
cmds:
- task: download:specs
- task: clean
- openapi-generator-cli generate -i "./openapi.yaml" \
--generator-name go \
--output api \
--ignore-file-override .openapi-generator-ignore \
--config config.yml
- task: format
download:specs:
cmds:
- wget https://data.commercelayer.app/schemas/openapi-no-ref.json -o ./openapi.yaml
tools:
cmds:
- npm install -g @openapitools/openapi-generator-cli
clean:
cmds:
- rm -rf api
format:
cmds:
- go fmt ./...
test:
cmds:
- go test -v ./...
docs:
cmds:
- go generate
coverage-html:
cmds:
- go test -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=./... ./...
- go tool cover -html=coverage.txt
coverage:
cmds:
- go test -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=./... ./...
- go tool cover -func=coverage.txt