dobi.yaml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. meta:
  2. project: gotestsum
  3. mount=source:
  4. bind: .
  5. path: /go/src/gotest.tools/gotestsum
  6. mount=buildcache:
  7. bind: ~/.cache/go-build
  8. path: /root/.cache/go-build
  9. mount=modcache:
  10. bind: ~/go/pkg/mod
  11. path: /go/pkg/mod
  12. image=builder:
  13. image: gotestsum-dev
  14. context: dobifiles/
  15. dockerfile: Dockerfile
  16. target: dev
  17. args:
  18. GOLANG_VERSION: '{env.GOLANG_VERSION:}'
  19. job=shell:
  20. use: builder
  21. mounts: [source, buildcache, modcache]
  22. interactive: true
  23. command: sh
  24. job=watch:
  25. use: builder
  26. mounts: [source, buildcache, modcache]
  27. interactive: true
  28. command: |
  29. filewatcher -x vendor ./dist/gotestsum -- -test.timeout 10s
  30. env: ['GOTESTSUM_FORMAT=short-verbose']
  31. depends: [binary]
  32. job=test-unit:
  33. use: builder
  34. mounts: [source, buildcache, modcache]
  35. interactive: true
  36. command: scripts/test-unit
  37. job=lint:
  38. use: builder
  39. mounts: [source, buildcache, modcache]
  40. command: golangci-lint run
  41. job=binary:
  42. use: builder
  43. mounts: [source, buildcache, modcache]
  44. command: bash -c 'mkdir -p dist; go build -o dist/gotestsum .'
  45. alias=test:
  46. tasks: [test-unit]