The code powering m.abunchtell.com https://m.abunchtell.com
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

241 Zeilen
6.6 KiB

  1. version: 2
  2. aliases:
  3. - &defaults
  4. docker:
  5. - image: circleci/ruby:2.7-buster-node
  6. environment: &ruby_environment
  7. BUNDLE_APP_CONFIG: ./.bundle/
  8. DB_HOST: localhost
  9. DB_USER: root
  10. RAILS_ENV: test
  11. PARALLEL_TEST_PROCESSORS: 4
  12. ALLOW_NOPAM: true
  13. CONTINUOUS_INTEGRATION: true
  14. DISABLE_SIMPLECOV: true
  15. PAM_ENABLED: true
  16. PAM_DEFAULT_SERVICE: pam_test
  17. PAM_CONTROLLED_SERVICE: pam_test_controlled
  18. working_directory: ~/projects/mastodon/
  19. - &attach_workspace
  20. attach_workspace:
  21. at: ~/projects/
  22. - &persist_to_workspace
  23. persist_to_workspace:
  24. root: ~/projects/
  25. paths:
  26. - ./mastodon/
  27. - &restore_ruby_dependencies
  28. restore_cache:
  29. keys:
  30. - v2-ruby-dependencies-{{ checksum "/tmp/.ruby-version" }}-{{ checksum "Gemfile.lock" }}
  31. - v2-ruby-dependencies-{{ checksum "/tmp/.ruby-version" }}-
  32. - v2-ruby-dependencies-
  33. - &install_steps
  34. steps:
  35. - checkout
  36. - *attach_workspace
  37. - restore_cache:
  38. keys:
  39. - v1-node-dependencies-{{ checksum "yarn.lock" }}
  40. - v1-node-dependencies-
  41. - run: yarn install --frozen-lockfile
  42. - save_cache:
  43. key: v1-node-dependencies-{{ checksum "yarn.lock" }}
  44. paths:
  45. - ./node_modules/
  46. - *persist_to_workspace
  47. - &install_system_dependencies
  48. run:
  49. name: Install system dependencies
  50. command: |
  51. sudo apt-get update
  52. sudo apt-get install -y libicu-dev libidn11-dev libprotobuf-dev protobuf-compiler
  53. ## TODO: FIX THESE BUSTER DEPENDANCES
  54. sudo wget http://ftp.au.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u3_amd64.deb
  55. sudo dpkg -i libicu57_57.1-6+deb9u3_amd64.deb
  56. sudo wget http://ftp.au.debian.org/debian/pool/main/p/protobuf/libprotobuf10_3.0.0-9_amd64.deb
  57. sudo dpkg -i libprotobuf10_3.0.0-9_amd64.deb
  58. - &install_ruby_dependencies
  59. steps:
  60. - *attach_workspace
  61. - *install_system_dependencies
  62. - run: ruby -e 'puts RUBY_VERSION' | tee /tmp/.ruby-version
  63. - *restore_ruby_dependencies
  64. - run: bundle install --clean --jobs 16 --path ./vendor/bundle/ --retry 3 --with pam_authentication --without development production && bundle clean
  65. - save_cache:
  66. key: v2-ruby-dependencies-{{ checksum "/tmp/.ruby-version" }}-{{ checksum "Gemfile.lock" }}
  67. paths:
  68. - ./.bundle/
  69. - ./vendor/bundle/
  70. - persist_to_workspace:
  71. root: ~/projects/
  72. paths:
  73. - ./mastodon/.bundle/
  74. - ./mastodon/vendor/bundle/
  75. - &test_steps
  76. steps:
  77. - *attach_workspace
  78. - *install_system_dependencies
  79. - run: sudo apt-get install -y ffmpeg
  80. - run:
  81. name: Prepare Tests
  82. command: ./bin/rails parallel:create parallel:load_schema parallel:prepare
  83. - run:
  84. name: Run Tests
  85. command: ./bin/retry bundle exec parallel_test ./spec/ --group-by filesize --type rspec
  86. jobs:
  87. install:
  88. <<: *defaults
  89. <<: *install_steps
  90. install-ruby2.7:
  91. <<: *defaults
  92. <<: *install_ruby_dependencies
  93. install-ruby2.6:
  94. <<: *defaults
  95. docker:
  96. - image: circleci/ruby:2.6-buster-node
  97. environment: *ruby_environment
  98. <<: *install_ruby_dependencies
  99. install-ruby2.5:
  100. <<: *defaults
  101. docker:
  102. - image: circleci/ruby:2.5-buster-node
  103. environment: *ruby_environment
  104. <<: *install_ruby_dependencies
  105. build:
  106. <<: *defaults
  107. steps:
  108. - *attach_workspace
  109. - *install_system_dependencies
  110. - run: ./bin/rails assets:precompile
  111. - persist_to_workspace:
  112. root: ~/projects/
  113. paths:
  114. - ./mastodon/public/assets
  115. - ./mastodon/public/packs-test/
  116. test-migrations:
  117. <<: *defaults
  118. docker:
  119. - image: circleci/ruby:2.7-buster-node
  120. environment: *ruby_environment
  121. - image: circleci/postgres:10.6-alpine
  122. environment:
  123. POSTGRES_USER: root
  124. - image: circleci/redis:5-alpine
  125. steps:
  126. - *attach_workspace
  127. - *install_system_dependencies
  128. - run:
  129. name: Create database
  130. command: ./bin/rails parallel:create
  131. - run:
  132. name: Run migrations
  133. command: ./bin/rails parallel:migrate
  134. test-ruby2.7:
  135. <<: *defaults
  136. docker:
  137. - image: circleci/ruby:2.7-buster-node
  138. environment: *ruby_environment
  139. - image: circleci/postgres:10.6-alpine
  140. environment:
  141. POSTGRES_USER: root
  142. - image: circleci/redis:5-alpine
  143. <<: *test_steps
  144. test-ruby2.6:
  145. <<: *defaults
  146. docker:
  147. - image: circleci/ruby:2.6-buster-node
  148. environment: *ruby_environment
  149. - image: circleci/postgres:10.6-alpine
  150. environment:
  151. POSTGRES_USER: root
  152. - image: circleci/redis:5-alpine
  153. <<: *test_steps
  154. test-ruby2.5:
  155. <<: *defaults
  156. docker:
  157. - image: circleci/ruby:2.5-buster-node
  158. environment: *ruby_environment
  159. - image: circleci/postgres:10.6-alpine
  160. environment:
  161. POSTGRES_USER: root
  162. - image: circleci/redis:5-alpine
  163. <<: *test_steps
  164. test-webui:
  165. <<: *defaults
  166. docker:
  167. - image: circleci/node:12-buster
  168. steps:
  169. - *attach_workspace
  170. - run: ./bin/retry yarn test:jest
  171. check-i18n:
  172. <<: *defaults
  173. steps:
  174. - *attach_workspace
  175. - *install_system_dependencies
  176. - run: bundle exec i18n-tasks check-normalized
  177. - run: bundle exec i18n-tasks unused -l en
  178. - run: bundle exec i18n-tasks check-consistent-interpolations
  179. - run: bundle exec rake repo:check_locales_files
  180. workflows:
  181. version: 2
  182. build-and-test:
  183. jobs:
  184. - install
  185. - install-ruby2.7:
  186. requires:
  187. - install
  188. - install-ruby2.6:
  189. requires:
  190. - install
  191. - install-ruby2.7
  192. - install-ruby2.5:
  193. requires:
  194. - install
  195. - install-ruby2.7
  196. - build:
  197. requires:
  198. - install-ruby2.7
  199. - test-migrations:
  200. requires:
  201. - install-ruby2.7
  202. - test-ruby2.7:
  203. requires:
  204. - install-ruby2.7
  205. - build
  206. - test-ruby2.6:
  207. requires:
  208. - install-ruby2.6
  209. - build
  210. - test-ruby2.5:
  211. requires:
  212. - install-ruby2.5
  213. - build
  214. - test-webui:
  215. requires:
  216. - install
  217. - check-i18n:
  218. requires:
  219. - install-ruby2.7