Last active
September 15, 2020 12:16
-
-
Save risentveber/bcb693b9ae2b47b758c970f8e7dcdda4 to your computer and use it in GitHub Desktop.
This file contains 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
version: '2' | |
tasks: | |
up: | |
desc: "Run docker compose and subscribe to logs" | |
deps: [down] | |
cmds: | |
- docker-compose up --build -d | |
- docker logs -f api | |
down: | |
desc: "Stop docker compose" | |
silent: true | |
cmds: | |
- docker-compose down | |
coverage: | |
desc: 'Run tests with coverage and open report in default browser' | |
cmds: | |
- go test -coverprofile=./tmp/cover.out ./... | |
- go tool cover -html=./tmp/cover.out -o ./tmp/cover.html | |
- open ./tmp/cover.html | |
attach_hooks: | |
desc: "Attach git hooks" | |
cmds: | |
- cp ./tools/pre-commit.sh ./.git/hooks/pre-commit | |
- cp ./tools/pre-push.sh ./.git/hooks/pre-push | |
- chmod 777 ./.git/hooks/pre-commit | |
- chmod 777 ./.git/hooks/pre-push | |
lint: | |
desc: "Run linter" | |
cmds: | |
- golangci-lint run --tests=0 ./... | |
test: | |
desc: "Run tests" | |
cmds: | |
- go test ./... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment