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.

209 lines
5.7 KiB

Spelling (#17705) * spelling: account Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: affiliated Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: appearance Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: autosuggest Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: cacheable Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: component Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: conversations Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: domain.example Clarify what's distinct and use RFC friendly domain space. Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: environment Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: exceeds Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: functional Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: inefficiency Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: not Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: notifications Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: occurring Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: position Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: progress Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: promotable Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: reblogging Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: repetitive Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: resolve Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: saturated Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: similar Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: strategies Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: success Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: targeting Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: thumbnails Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: unauthorized Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: unsensitizes Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: validations Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: various Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2 years ago
  1. version: 2.1
  2. orbs:
  3. ruby: circleci/ruby@1.4.1
  4. node: circleci/node@5.0.1
  5. executors:
  6. default:
  7. parameters:
  8. ruby-version:
  9. type: string
  10. docker:
  11. - image: cimg/ruby:<< parameters.ruby-version >>
  12. environment:
  13. BUNDLE_JOBS: 3
  14. BUNDLE_RETRY: 3
  15. CONTINUOUS_INTEGRATION: true
  16. DB_HOST: localhost
  17. DB_USER: root
  18. DISABLE_SIMPLECOV: true
  19. RAILS_ENV: test
  20. - image: cimg/postgres:14.0
  21. environment:
  22. POSTGRES_USER: root
  23. POSTGRES_HOST_AUTH_METHOD: trust
  24. - image: cimg/redis:6.2
  25. commands:
  26. install-system-dependencies:
  27. steps:
  28. - run:
  29. name: Install system dependencies
  30. command: |
  31. sudo apt-get update
  32. sudo apt-get install -y libicu-dev libidn11-dev
  33. install-ruby-dependencies:
  34. parameters:
  35. ruby-version:
  36. type: string
  37. steps:
  38. - run:
  39. command: |
  40. bundle config clean 'true'
  41. bundle config frozen 'true'
  42. bundle config without 'development production'
  43. name: Set bundler settings
  44. - ruby/install-deps:
  45. bundler-version: '2.3.8'
  46. key: ruby<< parameters.ruby-version >>-gems-v1
  47. wait-db:
  48. steps:
  49. - run:
  50. command: dockerize -wait tcp://localhost:5432 -wait tcp://localhost:6379 -timeout 1m
  51. name: Wait for PostgreSQL and Redis
  52. jobs:
  53. build:
  54. docker:
  55. - image: cimg/ruby:3.0-node
  56. environment:
  57. RAILS_ENV: test
  58. steps:
  59. - checkout
  60. - install-system-dependencies
  61. - install-ruby-dependencies:
  62. ruby-version: '3.0'
  63. - node/install-packages:
  64. cache-version: v1
  65. pkg-manager: yarn
  66. - run:
  67. command: ./bin/rails assets:precompile
  68. name: Precompile assets
  69. - persist_to_workspace:
  70. paths:
  71. - public/assets
  72. - public/packs-test
  73. root: .
  74. test:
  75. parameters:
  76. ruby-version:
  77. type: string
  78. executor:
  79. name: default
  80. ruby-version: << parameters.ruby-version >>
  81. environment:
  82. ALLOW_NOPAM: true
  83. PAM_ENABLED: true
  84. PAM_DEFAULT_SERVICE: pam_test
  85. PAM_CONTROLLED_SERVICE: pam_test_controlled
  86. parallelism: 4
  87. steps:
  88. - checkout
  89. - install-system-dependencies
  90. - run:
  91. command: sudo apt-get install -y ffmpeg imagemagick libpam-dev
  92. name: Install additional system dependencies
  93. - run:
  94. command: bundle config with 'pam_authentication'
  95. name: Enable PAM authentication
  96. - install-ruby-dependencies:
  97. ruby-version: << parameters.ruby-version >>
  98. - attach_workspace:
  99. at: .
  100. - wait-db
  101. - run:
  102. command: ./bin/rails db:create db:schema:load db:seed
  103. name: Load database schema
  104. - ruby/rspec-test
  105. test-migrations:
  106. executor:
  107. name: default
  108. ruby-version: '3.0'
  109. steps:
  110. - checkout
  111. - install-system-dependencies
  112. - install-ruby-dependencies:
  113. ruby-version: '3.0'
  114. - wait-db
  115. - run:
  116. command: ./bin/rails db:create
  117. name: Create database
  118. - run:
  119. command: ./bin/rails db:migrate VERSION=20171010025614
  120. name: Run migrations up to v2.0.0
  121. - run:
  122. command: ./bin/rails tests:migrations:populate_v2
  123. name: Populate database with test data
  124. - run:
  125. command: ./bin/rails db:migrate VERSION=20180514140000
  126. name: Run migrations up to v2.4.0
  127. - run:
  128. command: ./bin/rails tests:migrations:populate_v2_4
  129. name: Populate database with test data
  130. - run:
  131. command: ./bin/rails db:migrate
  132. name: Run all remaining migrations
  133. - run:
  134. command: ./bin/rails tests:migrations:check_database
  135. name: Check migration result
  136. test-two-step-migrations:
  137. executor:
  138. name: default
  139. ruby-version: '3.0'
  140. steps:
  141. - checkout
  142. - install-system-dependencies
  143. - install-ruby-dependencies:
  144. ruby-version: '3.0'
  145. - wait-db
  146. - run:
  147. command: ./bin/rails db:create
  148. name: Create database
  149. - run:
  150. command: ./bin/rails db:migrate VERSION=20171010025614
  151. name: Run migrations up to v2.0.0
  152. - run:
  153. command: ./bin/rails tests:migrations:populate_v2
  154. name: Populate database with test data
  155. - run:
  156. command: ./bin/rails db:migrate VERSION=20180514140000
  157. name: Run pre-deployment migrations up to v2.4.0
  158. environment:
  159. SKIP_POST_DEPLOYMENT_MIGRATIONS: true
  160. - run:
  161. command: ./bin/rails tests:migrations:populate_v2_4
  162. name: Populate database with test data
  163. - run:
  164. command: ./bin/rails db:migrate
  165. name: Run all pre-deployment migrations
  166. environment:
  167. SKIP_POST_DEPLOYMENT_MIGRATIONS: true
  168. - run:
  169. command: ./bin/rails db:migrate
  170. name: Run all post-deployment remaining migrations
  171. - run:
  172. command: ./bin/rails tests:migrations:check_database
  173. name: Check migration result
  174. workflows:
  175. version: 2
  176. build-and-test:
  177. jobs:
  178. - build
  179. - test:
  180. matrix:
  181. parameters:
  182. ruby-version:
  183. - '2.7'
  184. - '3.0'
  185. name: test-ruby<< matrix.ruby-version >>
  186. requires:
  187. - build
  188. - test-migrations:
  189. requires:
  190. - build
  191. - test-two-step-migrations:
  192. requires:
  193. - build
  194. - node/run:
  195. cache-version: v1
  196. name: test-webui
  197. pkg-manager: yarn
  198. requires:
  199. - build
  200. version: lts
  201. yarn-run: test:jest