-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathatkins.yml
More file actions
executable file
·53 lines (46 loc) · 1.43 KB
/
Copy pathatkins.yml
File metadata and controls
executable file
·53 lines (46 loc) · 1.43 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
#!/usr/bin/env atkins
# Atkins CI: https://github.com/titpetric/atkins
name: Vuego CI pipeline
vars:
name: vuego
jobs:
default:
desc: "Format, lint and test"
steps:
- task: fmt
- task: lint
- task: test
- task: cover
fmt:
desc: "Format the code"
steps:
- goimports -w -local $(go list .) .
- goimports-reviser -set-alias -format -imports-order "std,blanked,general,company,project" ./...
- go fmt ./...
- go mod tidy
lint:
desc: "Lint the code"
parallel: true
passthru: true
steps:
- go-fsck lint ./... --exclude imports,func-args || true
- golangci-lint run --fix ./... || true
test:
desc: "Run built tests"
passthru: true
tty: true
steps:
- run: gotestsum < test.json
deferred: true
- go test -count 1 -cover -coverpkg github.com/titpetric/vuego/... -coverprofile=pkg.cov -json ./... > test.json || true
cover:
desc: "Show source coverage"
steps:
- go-fsck extract . --include-sources
- go-fsck docs > docs/api.md
- go tool cover -func=pkg.cov | summary coverfunc --json > pkg.cov.json
- go-fsck extract --pretty-json ./...
- go-fsck coverage -c pkg.cov.json -o go-fsck.json
- go-fsck coverage --template=docs/testing-coverage.md.tpl -v > docs/testing-coverage.md
- perl -pi -e 's/github.com\/titpetric/titpetric/g' docs/testing-coverage.md
- task: mdox:fmt