mirror of
				https://github.com/go-task/task.git
				synced 2025-10-30 23:58:01 +02:00 
			
		
		
		
	chore: use gotestsum for test (#2381)
This commit is contained in:
		
							
								
								
									
										19
									
								
								Taskfile.yml
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								Taskfile.yml
									
									
									
									
									
								
							| @@ -8,6 +8,7 @@ includes: | ||||
|  | ||||
| vars: | ||||
|   BIN: "{{.ROOT_DIR}}/bin" | ||||
|   GOTESTSUM_FORMAT: '{{if .CI}}github-actions{{else}}pkgname{{end}}' | ||||
|  | ||||
| env: | ||||
|   CGO_ENABLED: '0' | ||||
| @@ -131,29 +132,37 @@ tasks: | ||||
|   test: | ||||
|     desc: Runs test suite | ||||
|     aliases: [t] | ||||
|     deps: [gotestsum:install] | ||||
|     sources: | ||||
|       - "**/*.go" | ||||
|       - "testdata/**/*" | ||||
|     cmds: | ||||
|       - go test ./... | ||||
|       - gotestsum -f '{{.GOTESTSUM_FORMAT}}' ./... | ||||
|  | ||||
|   test:watch: | ||||
|     desc: Runs test suite with watch tests included | ||||
|     deps: [sleepit:build] | ||||
|     deps: [sleepit:build, gotestsum:install] | ||||
|     cmds: | ||||
|       - go test ./... -tags 'watch' | ||||
|       - gotestsum -f '{{.GOTESTSUM_FORMAT}}' ./... -tags 'watch' | ||||
|  | ||||
|   test:all: | ||||
|     desc: Runs test suite with signals and watch tests included | ||||
|     deps: [sleepit:build] | ||||
|     deps: [sleepit:build, gotestsum:install] | ||||
|     cmds: | ||||
|       - go test -tags 'signals watch' ./... | ||||
|       - gotestsum -f '{{.GOTESTSUM_FORMAT}}' -tags 'signals watch' ./... | ||||
|  | ||||
|   goreleaser:test: | ||||
|     desc: Tests release process without publishing | ||||
|     cmds: | ||||
|       - goreleaser --snapshot --clean | ||||
|  | ||||
|   gotestsum:install: | ||||
|     desc: Installs gotestsum | ||||
|     status: | ||||
|       - command -v gotestsum | ||||
|     cmds: | ||||
|       - go install gotest.tools/gotestsum@latest | ||||
|  | ||||
|   goreleaser:install: | ||||
|     desc: Installs goreleaser | ||||
|     cmds: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user