Skip to content

Commit a494919

Browse files
authored
Use MetaMask/action-retry-command for possible flaky steps (#3263)
1 parent b041605 commit a494919

File tree

3 files changed

+17
-42
lines changed

3 files changed

+17
-42
lines changed

.github/workflows/build-lint-test.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,13 @@ jobs:
190190
name: build-source-${{ runner.os }}-${{ github.sha }}
191191
- name: Install Google Chrome
192192
if: ${{ matrix.package-name == '@metamask/snaps-controllers' || matrix.package-name == '@metamask/snaps-execution-environments' || matrix.package-name == '@metamask/snaps-utils' }}
193-
run: yarn install-chrome
194-
- run: yarn workspace ${{ matrix.package-name }} run test
193+
uses: MetaMask/action-retry-command@v1
194+
with:
195+
command: yarn install-chrome
196+
- name: Run tests
197+
uses: MetaMask/action-retry-command@v1
198+
with:
199+
command: yarn workspace ${{ matrix.package-name }} run test
195200
- name: Get coverage folder
196201
id: get-coverage-folder
197202
run: |
@@ -260,8 +265,10 @@ jobs:
260265
name: build-source-${{ runner.os }}-${{ github.sha }}
261266
- name: Build snap
262267
run: yarn workspace ${{ matrix.package-name }} run build
263-
- name: Run E2E test
264-
run: yarn workspace ${{ matrix.package-name }} run test
268+
- name: Run E2E tests
269+
uses: MetaMask/action-retry-command@v1
270+
with:
271+
command: yarn workspace ${{ matrix.package-name }} run test
265272
- name: Require clean working directory
266273
shell: bash
267274
run: |
@@ -282,5 +289,9 @@ jobs:
282289
uses: MetaMask/action-checkout-and-setup@v1
283290
with:
284291
is-high-risk-environment: false
285-
- run: yarn build:ci
286-
- run: yarn workspace @metamask/snaps-cli run test
292+
- name: Build dependencies
293+
run: yarn build:ci
294+
- name: Run tests
295+
uses: MetaMask/action-retry-command@v1
296+
with:
297+
command: yarn workspace @metamask/snaps-cli run test

.github/workflows/main.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -117,17 +117,3 @@ jobs:
117117
if [[ $passed != "true" ]]; then
118118
exit 1
119119
fi
120-
121-
re-run:
122-
name: Re-run failed jobs
123-
needs: lint-build-test
124-
if: failure() && fromJSON(github.run_attempt) < 3 && github.event.pull_request.user.login != 'dependabot[bot]' && github.event_name != 'merge_group'
125-
runs-on: ubuntu-latest
126-
permissions:
127-
actions: write
128-
steps:
129-
- env:
130-
GH_REPO: ${{ github.repository }}
131-
GH_TOKEN: ${{ github.token }}
132-
GH_DEBUG: api
133-
run: gh workflow run re-run.yml -F run-id=${{ github.run_id }}

.github/workflows/re-run.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)