about summary refs log tree commit diff
path: root/.circleci/config.yml
diff options
context:
space:
mode:
Diffstat (limited to '.circleci/config.yml')
-rw-r--r--.circleci/config.yml39
1 files changed, 38 insertions, 1 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index e3e4f83d9..751ca95b1 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -122,8 +122,42 @@ jobs:
           command: ./bin/rails db:create
           name: Create database
       - run:
+          command: ./bin/rails db:migrate VERSION=20171010025614
+          name: Run migrations up to v2.0.0
+      - run:
+          command: ./bin/rails tests:migrations:populate_v2
+          name: Populate database with test data
+      - run:
           command: ./bin/rails db:migrate
-          name: Run migrations
+          name: Run all remaining migrations
+
+  test-two-step-migrations:
+    executor:
+      name: default
+      ruby-version: '3.0'
+    steps:
+      - checkout
+      - install-system-dependencies
+      - install-ruby-dependencies:
+          ruby-version: '3.0'
+      - wait-db
+      - run:
+          command: ./bin/rails db:create
+          name: Create database
+      - run:
+          command: ./bin/rails db:migrate VERSION=20171010025614
+          name: Run migrations up to v2.0.0
+      - run:
+          command: ./bin/rails tests:migrations:populate_v2
+          name: Populate database with test data
+      - run:
+          command: ./bin/rails db:migrate
+          name: Run all pre-deployment migrations
+          evironment:
+            SKIP_POST_DEPLOYMENT_MIGRATIONS: true
+      - run:
+          command: ./bin/rails db:migrate
+          name: Run all post-deployment remaining migrations
 
 workflows:
   version: 2
@@ -142,6 +176,9 @@ workflows:
       - test-migrations:
           requires:
             - build
+      - test-two-step-migrations:
+          requires:
+            - build
       - node/run:
           cache-version: v1
           name: test-webui