chore: add retry to test steps in CI (#1517)

* chore: add retry to test steps of ci

* use another action for retry

* fix version

* use master version

* test with error

* return working version

* add env var

* return node test
This commit is contained in:
Sasha 2023-08-31 12:27:25 +02:00 committed by GitHub
parent e7e35f05ed
commit 73dd948698
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 33 additions and 12 deletions

View File

@ -16,6 +16,7 @@ on:
env: env:
NODE_JS: "18" NODE_JS: "18"
RETRY_ATTEMPTS: 3
jobs: jobs:
check: check:
@ -72,9 +73,14 @@ jobs:
node-version: ${{ env.NODE_JS }} node-version: ${{ env.NODE_JS }}
- uses: ./.github/actions/npm - uses: ./.github/actions/npm
- run: npm run build:esm - run: npm run build:esm
- run: npm run test:node
env: - uses: Wandalen/wretry.action@master
with:
attempt_limit: ${{ env.RETRY_ATTEMPTS }}
command: npm run test:node
with: |
DEBUG: "" DEBUG: ""
- name: Upload debug logs on failure - name: Upload debug logs on failure
@ -104,9 +110,14 @@ jobs:
node-version: ${{ env.NODE_JS }} node-version: ${{ env.NODE_JS }}
- uses: ./.github/actions/npm - uses: ./.github/actions/npm
- run: npm run build:esm - run: npm run build:esm
- run: npm run test:optional --workspace=@waku/tests
env: - uses: Wandalen/wretry.action@master
with:
attempt_limit: ${{ env.RETRY_ATTEMPTS }}
command: npm run test:optional --workspace=@waku/tests
with: |
DEBUG: "" DEBUG: ""
node_with_go_waku_master: node_with_go_waku_master:
@ -124,9 +135,14 @@ jobs:
node-version: ${{ env.NODE_JS }} node-version: ${{ env.NODE_JS }}
- uses: ./.github/actions/npm - uses: ./.github/actions/npm
- run: npm run build:esm - run: npm run build:esm
- run: npm run test:node
env: - uses: Wandalen/wretry.action@master
with:
attempt_limit: ${{ env.RETRY_ATTEMPTS }}
command: npm run test:node
with: |
DEBUG: "waku:nwaku*,waku:test*" DEBUG: "waku:nwaku*,waku:test*"
- name: Upload debug logs on failure - name: Upload debug logs on failure
@ -156,9 +172,14 @@ jobs:
node-version: ${{ env.NODE_JS }} node-version: ${{ env.NODE_JS }}
- uses: ./.github/actions/npm - uses: ./.github/actions/npm
- run: npm run build:esm - run: npm run build:esm
- run: npm run test:node
env: - uses: Wandalen/wretry.action@master
with:
attempt_limit: ${{ env.RETRY_ATTEMPTS }}
command: npm run test:node
with: |
DEBUG: "waku:nwaku*,waku:test*" DEBUG: "waku:nwaku*,waku:test*"
- name: Upload debug logs on failure - name: Upload debug logs on failure