Skip to content

Commit

Permalink
feat: add retries to failed jobs in gha ci
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbaHerrerias authored and janl committed Jan 18, 2022
1 parent 73a9bad commit e7e3eff
Showing 1 changed file with 66 additions and 6 deletions.
72 changes: 66 additions & 6 deletions .github/workflows/ci.yml
Expand Up @@ -56,7 +56,17 @@ jobs:
with:
node-version: ${{ matrix.node }}
couchdb-version: ${{ matrix.couchdb }}
- run: ${{ matrix.cmd }}
- id: test
run: ${{ matrix.cmd }}
continue-on-error: true
- name: First retry
id: retry
if: steps.test.outcome == 'failure'
run: ${{ matrix.cmd }}
continue-on-error: true
- name: Second retry
if: steps.retry.outcome == 'failure'
run: ${{ matrix.cmd }}

# Run the integration, find and mapreduce tests against CouchDB in the
# browser. This should be run against every version of CouchDB we support and
Expand Down Expand Up @@ -92,7 +102,17 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}
couchdb-version: ${{ matrix.couchdb }}
- run: ${{ matrix.cmd }}
- id: test
run: ${{ matrix.cmd }}
continue-on-error: true
- name: First retry
id: retry
if: steps.test.outcome == 'failure'
run: ${{ matrix.cmd }}
continue-on-error: true
- name: Second retry
if: steps.retry.outcome == 'failure'
run: ${{ matrix.cmd }}

# Run the integration, find and mapreduce tests against all the Node.js
# PouchDB adapters. This should be run for every adapter on every version of
Expand All @@ -118,7 +138,17 @@ jobs:
- uses: ./.github/actions/install-deps
with:
node-version: ${{ matrix.node }}
- run: ${{ matrix.cmd }}
- id: test
run: ${{ matrix.cmd }}
continue-on-error: true
- name: First retry
id: retry
if: steps.test.outcome == 'failure'
run: ${{ matrix.cmd }}
continue-on-error: true
- name: Second retry
if: steps.retry.outcome == 'failure'
run: ${{ matrix.cmd }}

# Run the integration, find and mapreduce tests against all the browser-based
# adapters. PouchDB adapters. This should be run for every adapter on every
Expand Down Expand Up @@ -151,7 +181,17 @@ jobs:
- uses: ./.github/actions/install-deps
with:
node-version: ${{ env.NODE_VERSION }}
- run: ${{ matrix.cmd }}
- id: test
run: ${{ matrix.cmd }}
continue-on-error: true
- name: First retry
id: retry
if: steps.test.outcome == 'failure'
run: ${{ matrix.cmd }}
continue-on-error: true
- name: Second retry
if: steps.retry.outcome == 'failure'
run: ${{ matrix.cmd }}

# Run the integration, find and mapreduce tests using pouchdb-server as the
# remote adapter. This checks that pouchdb-server works with the current
Expand Down Expand Up @@ -184,7 +224,17 @@ jobs:
- uses: ./.github/actions/install-deps
with:
node-version: ${{ env.NODE_VERSION }}
- run: ${{ matrix.cmd }}
- id: test
run: ${{ matrix.cmd }}
continue-on-error: true
- name: First retry
id: retry
if: steps.test.outcome == 'failure'
run: ${{ matrix.cmd }}
continue-on-error: true
- name: Second retry
if: steps.retry.outcome == 'failure'
run: ${{ matrix.cmd }}

# Run all the other testing tasks -- unit tests, and so on. These should be
# run on every version of Node.js that we support.
Expand All @@ -210,4 +260,14 @@ jobs:
- uses: ./.github/actions/install-deps
with:
node-version: ${{ matrix.node }}
- run: ${{ matrix.cmd }}
- id: test
run: ${{ matrix.cmd }}
continue-on-error: true
- name: First retry
id: retry
if: steps.test.outcome == 'failure'
run: ${{ matrix.cmd }}
continue-on-error: true
- name: Second retry
if: steps.retry.outcome == 'failure'
run: ${{ matrix.cmd }}

0 comments on commit e7e3eff

Please sign in to comment.