Skip to content

Commit

Permalink
Improve CI test run time and inconsistency (#5418)
Browse files Browse the repository at this point in the history
**Story card:**
[sc-12505](https://app.shortcut.com/simpledotorg/story/12505)

The CI test job is working inconsistently and takes a variable amount of
time to complete each run.

The number of parallelisms has been increased to 32, and each parallel
run will receive a Docker-based dedicated PostgreSQL instance.
  • Loading branch information
roypeter committed May 2, 2024
1 parent 1c3200a commit 136630b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ blocks:
- name: Tests
task:
env_vars:
- name: DATABASE_URL
value: "postgresql://postgres:@0.0.0.0:5432/myapp_test"
- name: RAILS_ENV
value: "test"
- name: TB_RSPEC_OPTIONS
Expand All @@ -44,9 +42,12 @@ blocks:
- bundle install
- "bundle exec standardrb"
- name: RSpec
parallelism: 8
parallelism: 32
commands:
- checkout
- docker run -d --name postgres14-$SEMAPHORE_JOB_INDEX -p 543$SEMAPHORE_JOB_INDEX:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:14
- export DATABASE_URL=postgresql://postgres@localhost:543$SEMAPHORE_JOB_INDEX
- export TEST_ENV_NUMBER=$SEMAPHORE_JOB_INDEX
- script/semaphore_setup
- rspec_booster --job $SEMAPHORE_JOB_INDEX/$SEMAPHORE_JOB_COUNT
epilogue:
Expand Down

0 comments on commit 136630b

Please sign in to comment.