forked from A1pen/nevercompletedgame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
62 lines (51 loc) · 1.42 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# https://taskfile.dev
version: '3'
tasks:
default:
desc: "List all tasks in this repository"
cmds:
- go-task --list-all
silent: true
qa:
desc: "run code quality tasks"
cmds:
- task: analyze
- task: test
analyze:
desc: "analyze code"
cmds:
- go vet ./...
- go run honnef.co/go/tools/cmd/staticcheck@latest --checks=all ./...
test:
desc: "run tests"
cmds:
- go test ./...
coverage:
desc: "create test coverage report"
cmds:
- task: test
- mkdir -p coverage
- go test -coverprofile=./coverage/coverage.out ./...
- go tool cover -html=./coverage/coverage.out -o ./coverage/coverage.html
build:
desc: "build the application"
cmds:
- task: qa
- mkdir -p build
- go build -o ./build/ncg
build-docker:
desc: "Build application and docker image"
cmds:
- podman build --tag cschritt/ncg .
run:
desc: "Run docker image"
cmds:
- podman run --detach --rm --publish 3000:3000 localhost/cschritt/ncg:latest
kill:
desc: "Kill all running containers"
cmds:
- podman kill $(podman ps --quiet --filter "ancestor=localhost/cschritt/ncg")
clean:
desc: "Remove build artifacts and not running containers"
cmds:
- podman rm $(podman ps --all --quiet --filter "ancestor=localhost/cschritt/ncg")