Created
May 6, 2024 08:56
-
-
Save alexshd/57da205908e27980b54ce58149644546 to your computer and use it in GitHub Desktop.
`Taskfile` base example for `go` project - test and rebuild on each saved change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://taskfile.dev | |
version: "3" | |
interval: 500ms | |
tasks: | |
default: | |
deps: | |
- test | |
test: | |
cmds: | |
- gotest -cover -race ./... | |
build: | |
cmds: | |
- task: tidy | |
- go build -o ./bin/app . | |
tidy: | |
cmds: | |
- go mod tidy | |
run: | |
desc: Watch and rebuild | |
watch: true | |
sources: | |
- "**/*.go" | |
generates: | |
- ./bin/app | |
deps: | |
- build | |
- test | |
cmds: | |
- ./bin/w17 | |
silent: false | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment