From e6a51fd033d23ee3a2a2b548f6656eb0c0da399b Mon Sep 17 00:00:00 2001 From: Ziwen Ning Date: Wed, 7 Dec 2022 21:12:47 -0800 Subject: [PATCH] test retry --- .github/workflows/release-installer.yaml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-installer.yaml b/.github/workflows/release-installer.yaml index ca4b35f36..9e3990186 100644 --- a/.github/workflows/release-installer.yaml +++ b/.github/workflows/release-installer.yaml @@ -2,20 +2,18 @@ # When the installers are ready in installer private bucket, run this workflow to test them. # TODO: Add job of uploading installers to Github release when installer tests are stable. # "release" runner tag is to make target hosts deterministic for easy clean up. +# Currently installer tests sometimes need manual cleanup via SSHing to the host. # TODO: Remove the "release" runner tag when installer tests are stable. name: Release Installer on: workflow_dispatch: + push: permissions: id-token: write # This is required for requesting the JWT contents: read # This is required for actions/checkout jobs: - # TODO: fix the arm64 test installer. - # Currently the first time of calling any Finch command in arm64 hosts triggered by Github action will fail by - # the error "Error: Process completed with exit code 137." So the arm64 job will fail. - # We temporarily use follow-up manual steps to complete and clean up it. macos-arm64-test-installer: strategy: fail-fast: false @@ -50,10 +48,23 @@ jobs: run: | aws s3 cp s3://${{ secrets.INSTALLER_PRIVATE_BUCKET_NAME }}/Finch-${GITHUB_REF_NAME}-aarch64.pkg Finch-${GITHUB_REF_NAME}-aarch64.pkg - name: Silently install - # Rosetta is only needed in arm64 + # Rosetta is only needed in arm64. Currently the installer command will fail to install without Rosetta. + # TODO: Remove Rosetta command when the installer is fixed. (https://github.com/runfinch/finch/issues/105) run: | echo 'A' | sudo softwareupdate --install-rosetta sudo installer -pkg Finch-${GITHUB_REF_NAME}-aarch64.pkg -target / + # Currently the first time of calling any Finch command in arm64 hosts triggered by Github action will fail by + # the error "Error: Process completed with exit code 137." So the arm64 job will fail. + # Adding one time retry could make it work. + # TODO: remove the activation step when the root cause is fixed. () + - name: Activation + uses: nick-fields/retry@v2 + with: + max_attempts: 1 + retry_on: error + timeout_seconds: 5 + command: | + finch version - name: Run e2e tests run: INSTALLED=true make test-e2e - name: Silently uninstall