about summary refs log tree commit diff
path: root/.circleci/config.yml
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-03-07 23:40:55 +0100
committerGitHub <noreply@github.com>2022-03-07 23:40:55 +0100
commit61ae6b35357c1ca71f61d81e357e3851f0e3de8d (patch)
tree6bce1816f498a926a9425a1afe8cebb44bad3c51 /.circleci/config.yml
parentdba4be1038063845a74e83aaa85d6ab08d5625dd (diff)
Add more migration tests (#17710)
* Add migration tests for hide_network settings migration

* Add tests about suspended/suspended_at

* Add more tests regarding the results of migrations

* Fix migration test regarding stale conflicting remote account

* Add migration tests about AccountConversation
Diffstat (limited to '.circleci/config.yml')
-rw-r--r--.circleci/config.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 318f4d2be..6d89e670a 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -128,8 +128,17 @@ jobs:
           command: ./bin/rails tests:migrations:populate_v2
           name: Populate database with test data
       - run:
+          command: ./bin/rails db:migrate VERSION=20180514140000
+          name: Run migrations up to v2.4.0
+      - run:
+          command: ./bin/rails tests:migrations:populate_v2_4
+          name: Populate database with test data
+      - run:
           command: ./bin/rails db:migrate
           name: Run all remaining migrations
+      - run:
+          command: ./bin/rails tests:migrations:check_database
+          name: Check migration result
 
   test-two-step-migrations:
     executor:
@@ -151,6 +160,14 @@ jobs:
           command: ./bin/rails tests:migrations:populate_v2
           name: Populate database with test data
       - run:
+          command: ./bin/rails db:migrate VERSION=20180514140000
+          name: Run pre-deployment migrations up to v2.4.0
+          environment:
+            SKIP_POST_DEPLOYMENT_MIGRATIONS: true
+      - run:
+          command: ./bin/rails tests:migrations:populate_v2_4
+          name: Populate database with test data
+      - run:
           command: ./bin/rails db:migrate
           name: Run all pre-deployment migrations
           environment:
@@ -158,6 +175,9 @@ jobs:
       - run:
           command: ./bin/rails db:migrate
           name: Run all post-deployment remaining migrations
+      - run:
+          command: ./bin/rails tests:migrations:check_database
+          name: Check migration result
 
 workflows:
   version: 2