diff --git a/.mise.toml b/.mise.toml index e7d20153c2f460fddc51e286104ddc8f500f6aaf..c3c9532a0dd5b4dcf51681d8b8b8e1505020bb8e 100644 --- a/.mise.toml +++ b/.mise.toml @@ -6,3 +6,21 @@ legacy_version_file = false [plugins] # Use this section to configure the source of any custom mise/asdf plugin + +[tasks.lint] +description = "runs golangci-lint" +run = ''' +golangci-lint run --timeout 5m +''' + +[tasks.tidy] +description = "runs go mod tidy" +run = "go mod tidy" + +[tasks.test] +description = "runs all tests" +run = "go test -v ./..." + +[tasks.run-test] +description = "runs a single test by name - mise run-test TestName" +run = 'go test -v ./... -run ^{{arg(name="test")}}$' diff --git a/lint.sh b/lint.sh deleted file mode 100755 index cfe341f43bbb668a5a63e8cb4b7eb6a1c49470cf..0000000000000000000000000000000000000000 --- a/lint.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env sh - -set -eux -# Write the code coverage report to gl-code-quality-report.json -# and print linting issues to stdout in the format: path/to/file:line description -# https://docs.gitlab.com/ee/development/go_guide/#automatic-linting -golangci-lint run --timeout 5m --out-format code-climate | - tee gl-code-quality-report.json | - jq -r '.[] | "\(.location.path):\(.location.lines.begin) \(.description)"' diff --git a/tidy.sh b/tidy.sh deleted file mode 100755 index 090dfb5d5598f9fecb7f60410f0ba797cf0d4c0e..0000000000000000000000000000000000000000 --- a/tidy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env sh - -set -eux - -# Check go tidy -git diff go.sum go.mod >/tmp/gomod-"${CI_JOB_ID}"-before -git diff go.sum go.mod >/tmp/gomod-"${CI_JOB_ID}"-after -go mod tidy -diff -U0 /tmp/gomod-"${CI_JOB_ID}"-before /tmp/gomod-"${CI_JOB_ID}"-after