about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-01-11 02:04:57 +0100
committerEugen Rochko <eugen@zeonfederated.com>2020-01-11 02:04:57 +0100
commit630b5136ec0c533154947bb3c410db63cd76426c (patch)
treeb593e91a7c987e952141bfe133d9619d249c2cd6
parentbaa3db3001b576a3d7b1ae5ca8b414416bd4567f (diff)
Add CircleCI task to test migrations (#12815)
-rw-r--r--.circleci/config.yml22
1 files changed, 22 insertions, 0 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 6922d033a..6a948d8c1 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -135,6 +135,25 @@ jobs:
               - ./mastodon/public/assets
               - ./mastodon/public/packs-test/
 
+  test-migrations:
+    <<: *defaults
+    docker:
+      - image: circleci/ruby:2.7-buster-node
+        environment: *ruby_environment
+      - image: circleci/postgres:10.6-alpine
+        environment:
+          POSTGRES_USER: root
+      - image: circleci/redis:5-alpine
+    steps:
+      - *attach_workspace
+      - *install_system_dependencies
+      - run:
+          name: Create database
+          command: ./bin/rails parallel:create
+      - run:
+          name: Run migrations
+          command: ./bin/rails parallel:migrate
+
   test-ruby2.7:
     <<: *defaults
     docker:
@@ -220,6 +239,9 @@ workflows:
       - build:
           requires:
             - install-ruby2.7
+      - test-migrations:
+          requires:
+            - install-ruby2.7
       - test-ruby2.7:
           requires:
             - install-ruby2.7