Skip to content

Commit

Permalink
chore(sdk): adding auto retry to the sdk gh workflow (#3770)
Browse files Browse the repository at this point in the history
From the few runs I looked into, it seems like the reason for failure is either a network error installing wing (is it blocked by NPM in any way?) or occasional fails in the tests themselves...
I added a retry option to make them more stable:
https://github.com/winglang/wing/actions/runs/5818534372 

## Checklist

- [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted)
- [x] Description explains motivation and solution
- [ ] Tests added (always)
- [ ] Docs updated (only required for features)
- [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
  • Loading branch information
tsuf239 authored Aug 14, 2023
1 parent fc4e195 commit 0139181
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/tf-aws-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ jobs:
with:
node-version: 18
- name: Install winglang globally
run: npm install -g winglang
uses: nick-fields/retry@v2
with:
max_attempts: 3
retry_on: error
timeout_minutes: 5
command: npm install -g winglang
- name: Installing external js modules
run: |
cd examples/tests/sdk_tests
Expand All @@ -56,10 +61,15 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
- name: Execute wing test in matrix directory
uses: nick-fields/retry@v2
env:
TF_LOG: info
TF_LOG_PATH: ${{ runner.workspace }}/terraform.log
run: wing test -t tf-aws ${{ matrix.test.directory }}/*.w
with:
max_attempts: 3
retry_on: error
timeout_minutes: 20
command: wing test -t tf-aws ${{ matrix.test.directory }}/*.w
- name: Output Terraform log
if: failure()
run: cat ${{ runner.workspace }}/terraform.log

0 comments on commit 0139181

Please sign in to comment.