Skip to content

Commit

Permalink
Retry test db setup (#2420)
Browse files Browse the repository at this point in the history
* Remove node

* Move to one line

* Add retry for db setup

* drop database before setting up

* Run 80 jobs

* Back to 40
  • Loading branch information
vertism authored Jul 16, 2024
1 parent f2777bb commit 60b756c
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ jobs:
with:
bundler-cache: true

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 14.17.5

- name: Find yarn cache location
id: yarn-cache
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
Expand All @@ -94,17 +89,20 @@ jobs:
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
restore-keys: ${{ runner.os }}-yarn-

- name: Install packages
run: |
yarn install --pure-lockfile
run: yarn install --pure-lockfile

- name: Setup databases
uses: nick-fields/retry@v3
with:
timeout_minutes: 1
max_attempts: 3
command: bin/rake 'parallel:drop' && bin/rake 'parallel:setup[4]'

- name: Run unit and feature tests
run: |
bin/rake 'parallel:setup[4]'
bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" --group-by "runtime"
run: bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" --group-by "runtime"

- name: Upload coverage
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 60b756c

Please sign in to comment.