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.

114 lines
2.1 KiB

  1. workspace:
  2. base: /srv/app
  3. path: src/code.gitea.io/gitea
  4. pipeline:
  5. test:
  6. image: webhippie/golang:edge
  7. pull: true
  8. environment:
  9. CGO_ENABLED: 1
  10. TAGS: cert sqlite pam miniwinsvc
  11. commands:
  12. - apk -U add linux-pam-dev openssh-client
  13. - make clean
  14. - make vet
  15. # - make lint
  16. - make test
  17. - make build
  18. when:
  19. event: [ push, tag, pull_request ]
  20. test-mysql:
  21. image: webhippie/golang:edge
  22. pull: true
  23. commands:
  24. - make test-mysql
  25. when:
  26. event: [ push ]
  27. test-pgsql:
  28. image: webhippie/golang:edge
  29. pull: true
  30. commands:
  31. - make test-pgsql
  32. when:
  33. event: [ push ]
  34. coverage:
  35. image: plugins/coverage
  36. server: https://coverage.gitea.io
  37. when:
  38. event: [ push, tag, pull_request ]
  39. updater:
  40. image: karalabe/xgo-latest:latest
  41. pull: true
  42. commands:
  43. - make publish
  44. when:
  45. event: [ push, tag ]
  46. branch: [ master, refs/tags/* ]
  47. # docker:
  48. # image: plugins/docker
  49. # repo: gitea/gitea
  50. # tags: [ '${TAG}' ]
  51. # when:
  52. # event: [ tag ]
  53. # branch: [ refs/tags/* ]
  54. # docker:
  55. # image: plugins/docker
  56. # repo: gitea/gitea
  57. # tags: [ 'latest' ]
  58. # when:
  59. # event: [ push ]
  60. # branch: [ master ]
  61. release:
  62. image: plugins/s3
  63. path_style: true
  64. strip_prefix: dist/release/
  65. source: dist/release/*
  66. target: /gitea/master
  67. when:
  68. event: [ push ]
  69. branch: [ master ]
  70. release:
  71. image: plugins/s3
  72. path_style: true
  73. strip_prefix: dist/release/
  74. source: dist/release/*
  75. target: /gitea/$$TAG
  76. when:
  77. event: [ tag ]
  78. branch: [ refs/tags/* ]
  79. github:
  80. image: plugins/github-release
  81. files:
  82. - dist/release/*
  83. when:
  84. event: [ tag ]
  85. branch: [ refs/tags/* ]
  86. gitter:
  87. image: plugins/gitter
  88. services:
  89. mysql:
  90. image: mysql:5.7
  91. environment:
  92. - MYSQL_DATABASE=test
  93. - MYSQL_ALLOW_EMPTY_PASSWORD=yes
  94. when:
  95. event: [ push ]
  96. pgsql:
  97. image: postgres:9.5
  98. environment:
  99. - POSTGRES_DB=test
  100. when:
  101. event: [ push ]