From af3b48ae930118fad922e716db42ac08d1dcfe41 Mon Sep 17 00:00:00 2001 From: ThibG Date: Sat, 11 Jan 2020 02:04:57 +0100 Subject: [PATCH] Add CircleCI task to test migrations (#12815) --- .circleci/config.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6922d033a3..6a948d8c1e 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