diff --git a/.gitignore b/.gitignore index e4cc4fd..3345624 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,15 @@ .cache/ -.task/ node_modules/ testdata/fixtures/*.openapi.yaml + +.task/ +dist/ +build/ +coverage/ +.test-results/ +test-results/ +*.test +*.prof +*.pprof +dump-*.json +**/.moon/cache/ diff --git a/.moon/tasks/all.yml b/.moon/tasks/all.yml new file mode 100644 index 0000000..d01c54c --- /dev/null +++ b/.moon/tasks/all.yml @@ -0,0 +1,7 @@ +env: + GOCACHE: ${HOME}/.cache/go-build + GOTMPDIR: ${HOME}/.cache/go-build +taskOptions: + cache: false + unixShell: bash + outputStyle: stream diff --git a/.moon/workspace.yml b/.moon/workspace.yml new file mode 100644 index 0000000..5902d49 --- /dev/null +++ b/.moon/workspace.yml @@ -0,0 +1,13 @@ +defaultProject: oasmith +projects: + oasmith: . +versionConstraint: ">=2.5.4 <3.0.0" +vcs: + client: git + defaultBranch: master +pipeline: + installDependencies: false + syncProjects: false + syncWorkspace: false +hasher: + walkStrategy: glob diff --git a/README.md b/README.md index 79aa13c..d55f131 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ by the application, commonly `traceparent`, `tracestate`, and `baggage`. [Task](https://taskfile.dev) runs the complete project check. ```sh -task check +pkgx moon run check ``` ## License diff --git a/Taskfile.yaml b/Taskfile.yaml deleted file mode 100644 index bca32f6..0000000 --- a/Taskfile.yaml +++ /dev/null @@ -1,37 +0,0 @@ -version: 3 - -tasks: - mod:download: - run: once - cmd: go mod download - sources: - - go.mod - - go.sum - - test: - run: once - deps: - - mod:download - cmd: go test ./... - sources: - - ./**/*.go - - internal/**/*.gotmpl - - go.sum - - lint: - run: once - deps: - - mod:download - cmds: - - gofmt -w . - - go tool golangci-lint run --allow-serial-runners ./... - sources: - - ./**/*.go - - .golangci.yaml - - go.sum - - check: - run: once - deps: - - lint - - test diff --git a/moon.yml b/moon.yml new file mode 100644 index 0000000..e809200 --- /dev/null +++ b/moon.yml @@ -0,0 +1,41 @@ +toolchains: + default: system +tasks: + mod-download: + inputs: + - go.mod + - go.sum + script: |- + set -euo pipefail + go mod download + options: + cache: true + test: + deps: + - oasmith:mod-download + inputs: + - ./**/*.go + - internal/**/*.gotmpl + - go.sum + script: |- + set -euo pipefail + go test ./... + options: + cache: true + lint: + deps: + - oasmith:mod-download + inputs: + - ./**/*.go + - .golangci.yaml + - go.sum + script: |- + set -euo pipefail + gofmt -w . + go tool golangci-lint run --allow-serial-runners ./... + options: + cache: true + check: + deps: + - oasmith:lint + - oasmith:test