-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add taskfiles to simplify development (#103)
- Loading branch information
Showing
8 changed files
with
109 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
golang 1.22.9 | ||
golangci-lint 1.62.0 | ||
task 3.40.0 |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# https://taskfile.dev | ||
|
||
version: "3" | ||
|
||
includes: | ||
install: | ||
taskfile: ./taskfiles/install/Taskfile.yml | ||
|
||
lint: | ||
taskfile: ./taskfiles/lint/Taskfile.yml | ||
|
||
test: | ||
taskfile: ./taskfiles/test/Taskfile.yml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: '3' | ||
|
||
includes: | ||
asdf: | ||
taskfile: ./asdf.yml | ||
|
||
tasks: | ||
tools: | ||
desc: Installs development tools | ||
cmds: | ||
- task: asdf:install |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: '3' | ||
|
||
tasks: | ||
install: | ||
internal: true | ||
desc: Installs the tools defined in asdf | ||
dir: '{{.USER_WORKING_DIR}}' | ||
cmds: | ||
# Add all the plugins defined in .tool-versions by reading the first column for the plugin | ||
# name and adding it to asdf | ||
- awk '{print $1}' .tool-versions | xargs -I _ asdf plugin add _ | ||
|
||
# Install all the tools defined in .tool-versions | ||
- asdf install |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: '3' | ||
|
||
tasks: | ||
default: | ||
desc: "Run Go lint checks" | ||
cmds: | ||
- golangci-lint run | ||
fix: | ||
desc: "Fix Go lint issues" | ||
cmds: | ||
- | | ||
echo "Fixing Go lint issues..." | ||
gofmt -s -w . | ||
goimports -w . | ||
golangci-lint run --fix |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: '3' | ||
|
||
tasks: | ||
default: | ||
desc: "Run the entire test suite" | ||
cmds: | ||
- go test {{.CLI_ARGS}} ./... | ||
|
||
coverage: | ||
desc: "Run the entire test suite with coverage" | ||
cmds: | ||
- go test -coverprofile=coverage.out -covermode count ./... | ||
- go tool cover -html=coverage.out | ||
|
||
race: | ||
desc: "Run the entire test suite with race detection" | ||
cmds: | ||
- go test -race ./... |