Browse Source

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
pull/1413/head
kosiakkatrina 2 years ago committed by GitHub
parent
commit
c9aad8c5d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      .github/workflows/production_pipeline.yml
  2. 5
      .github/workflows/staging_pipeline.yml

5
.github/workflows/production_pipeline.yml

@ -42,6 +42,7 @@ jobs:
DB_USERNAME: postgres DB_USERNAME: postgres
DB_PASSWORD: password DB_PASSWORD: password
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
PARALLEL_TEST_PROCESSORS: 4
steps: steps:
- name: Get latest release with tag - name: Get latest release with tag
@ -71,7 +72,7 @@ jobs:
- name: Create database - name: Create database
run: | run: |
bundle exec rake db:prepare bundle exec rake parallel:setup
- name: Compile Assets - name: Compile Assets
run: | run: |
@ -79,7 +80,7 @@ jobs:
- name: Run tests - name: Run tests
run: | run: |
bundle exec rspec --exclude-pattern "features/*" --fail-fast bundle exec rake parallel:spec['spec\/(?!features)']
feature_test: feature_test:
name: Feature Tests name: Feature Tests

5
.github/workflows/staging_pipeline.yml

@ -45,6 +45,7 @@ jobs:
DB_USERNAME: postgres DB_USERNAME: postgres
DB_PASSWORD: password DB_PASSWORD: password
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
PARALLEL_TEST_PROCESSORS: 4
steps: steps:
- name: Checkout - name: Checkout
@ -63,7 +64,7 @@ jobs:
- name: Create database - name: Create database
run: | run: |
bundle exec rake db:prepare bundle exec rake parallel:setup
- name: Compile assets - name: Compile assets
run: | run: |
@ -71,7 +72,7 @@ jobs:
- name: Run tests - name: Run tests
run: | run: |
bundle exec rspec --exclude-pattern "features/*" --fail-fast bundle exec rake parallel:spec['spec\/(?!features)']
feature_test: feature_test:
name: Feature Tests name: Feature Tests

Loading…
Cancel
Save