You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

131 lines
2.4 KiB

  1. ---
  2. kind: pipeline
  3. type: docker
  4. name: linux-test
  5. steps:
  6. - name: fetch
  7. image: golang:1.17.5
  8. volumes:
  9. - name: deps
  10. path: /go
  11. commands:
  12. #- go get -u golang.org/x/lint/golint
  13. - go install honnef.co/go/tools/cmd/staticcheck@latest
  14. - git fetch --tags
  15. - go get
  16. - echo `git describe --tags` > VERSION
  17. - echo `date +%G-%m-%d-%H-%M` > BUILDDATE
  18. - name: quality
  19. image: golang:1.17.5
  20. volumes:
  21. - name: deps
  22. path: /go
  23. commands:
  24. - go list ./... | xargs go vet
  25. - staticcheck ./...
  26. - name: units-tests
  27. image: golang:1.17.5
  28. volumes:
  29. - name: deps
  30. path: /go
  31. commands:
  32. - sh testing/tests.sh
  33. - name: test-builda-app
  34. image: golang:1.17.5
  35. volumes:
  36. - name: deps
  37. path: /go
  38. commands:
  39. - cd app
  40. - go build
  41. - name: notify-email
  42. image: drillster/drone-email
  43. pull: if-not-exists
  44. settings:
  45. host: build.openprivacy.ca
  46. port: 25
  47. skip_verify: true
  48. from: drone@openprivacy.ca
  49. when:
  50. status: [failure]
  51. - name: notify-gogs
  52. pull: if-not-exists
  53. image: openpriv/drone-gogs
  54. when:
  55. event: pull_request
  56. status: [success, changed, failure]
  57. environment:
  58. GOGS_ACCOUNT_TOKEN:
  59. from_secret: gogs_account_token
  60. settings:
  61. gogs_url: https://git.openprivacy.ca
  62. volumes:
  63. # gopath where bin and pkg lives to persist across steps
  64. - name: deps
  65. temp: {}
  66. trigger:
  67. repo: cwtch.im/server
  68. branch: trunk
  69. event:
  70. - push
  71. - pull_request
  72. - tag
  73. ---
  74. kind: pipeline
  75. type: exec
  76. name: mac-test
  77. platform:
  78. os: darwin
  79. arch: amd64
  80. steps:
  81. - name: fetch
  82. volumes:
  83. - name: deps
  84. path: /go
  85. commands:
  86. - export PATH=$PATH:/usr/local/go/bin
  87. - go get
  88. - name: units-tests
  89. volumes:
  90. - name: deps
  91. path: /go
  92. commands:
  93. - export PATH=$PATH:/usr/local/go/bin
  94. - sh testing/tests.sh
  95. - name: test-builda-app
  96. volumes:
  97. - name: deps
  98. path: /go
  99. commands:
  100. - export PATH=$PATH:/usr/local/go/bin
  101. - cd app
  102. - go build
  103. volumes:
  104. # gopath where bin and pkg lives to persist across steps
  105. - name: deps
  106. temp: {}
  107. trigger:
  108. repo: cwtch.im/server
  109. branch: trunk
  110. event:
  111. - push
  112. - pull_request
  113. - tag
  114. # TODO: windows: but need windows docker containers with
  115. # go + gcc to compile sqlite. Will prolly come from likewise work for Cwtch