Skip to content

Commit

Permalink
chore: add Taskfile
Browse files Browse the repository at this point in the history
  • Loading branch information
nikoheikkila committed May 13, 2024
1 parent c009110 commit b73d519
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This file lists all the tasks developers can run while developing this library.
# Run `task -a` to list all the available tasks
# See https://taskfile.dev/ for details
version: '3'

tasks:

setup:
desc: Install necessary tools
internal: true
silent: true
cmds:
- >
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh |
sh -s -- -b {{ .GOPATH }}/bin v{{ .GOLANGCILINT_VERSION }}
status:
- command -v golangci-lint
- golangci-lint --version | grep -q "{{ .GOLANGCILINT_VERSION }}"
vars:
GOLANGCILINT_VERSION: 1.58.0
GOPATH:
sh: go env GOPATH

deps:
desc: Install necessary Go dependencies
internal: true
silent: true
cmds:
- go mod download
- go mod tidy

format:
desc: Check Go formatting
cmds:
- go fmt ./...

lint:
desc: Lint with golangci-lint
cmds:
- golangci-lint run --timeout=5m

test:
desc: Run acceptance tests
deps:
- setup
- deps
- format
- lint
cmds:
- go test -v ./...

0 comments on commit b73d519

Please sign in to comment.