From c9aad8c5d15ef9eb01b7ae08b3799ca5cb2216fb Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Tue, 14 Mar 2023 11:02:54 +0000 Subject: [PATCH] Run tests in parallel (#1412) * Run tests in parallel * Failing test * Add parallel tests to prod pipeline * Remove failing test * Add PARALLEL_TEST_PROCESSORS env var --- .github/workflows/production_pipeline.yml | 5 +++-- .github/workflows/staging_pipeline.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/production_pipeline.yml b/.github/workflows/production_pipeline.yml index 23bb69c00..82f37e743 100644 --- a/.github/workflows/production_pipeline.yml +++ b/.github/workflows/production_pipeline.yml @@ -42,6 +42,7 @@ jobs: DB_USERNAME: postgres DB_PASSWORD: password RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} + PARALLEL_TEST_PROCESSORS: 4 steps: - name: Get latest release with tag @@ -71,7 +72,7 @@ jobs: - name: Create database run: | - bundle exec rake db:prepare + bundle exec rake parallel:setup - name: Compile Assets run: | @@ -79,7 +80,7 @@ jobs: - name: Run tests run: | - bundle exec rspec --exclude-pattern "features/*" --fail-fast + bundle exec rake parallel:spec['spec\/(?!features)'] feature_test: name: Feature Tests diff --git a/.github/workflows/staging_pipeline.yml b/.github/workflows/staging_pipeline.yml index 8d48f7b7e..9ca8cb69d 100644 --- a/.github/workflows/staging_pipeline.yml +++ b/.github/workflows/staging_pipeline.yml @@ -45,6 +45,7 @@ jobs: DB_USERNAME: postgres DB_PASSWORD: password RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} + PARALLEL_TEST_PROCESSORS: 4 steps: - name: Checkout @@ -63,7 +64,7 @@ jobs: - name: Create database run: | - bundle exec rake db:prepare + bundle exec rake parallel:setup - name: Compile assets run: | @@ -71,7 +72,7 @@ jobs: - name: Run tests run: | - bundle exec rspec --exclude-pattern "features/*" --fail-fast + bundle exec rake parallel:spec['spec\/(?!features)'] feature_test: name: Feature Tests