Skip to content

Commit

Permalink
Tests: Retry for MacOS (#579)
Browse files Browse the repository at this point in the history
* Tests: Retry for MacOS

* Update action.yml

* Update action.yml

* Increased timeouts
  • Loading branch information
Aragas authored Feb 14, 2024
1 parent d46b17b commit f3d3122
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 10 deletions.
18 changes: 16 additions & 2 deletions .github/actions/test-execute-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,28 @@ runs:
}
shell: pwsh

- name: Perform Tests Windows .NET | Ubuntu/MacOS/MacOS-arm64 .NET/Mono
if: ${{(inputs.os == 'windows' && inputs.runtime-type == 'dotnet') || inputs.os == 'ubuntu' || inputs.os == 'macos' || inputs.os == 'macos-arm64'}}
- name: Perform Tests Windows .NET | Ubuntu .NET/Mono
if: ${{(inputs.os == 'windows' && inputs.runtime-type == 'dotnet') || inputs.os == 'ubuntu'}}
run: |
foreach ($target_framework in ConvertFrom-Json "${{steps.test-args.outputs.target_frameworks}}") {
dotnet test "HarmonyTests/bin/Release/$target_framework/HarmonyTests.dll" -f $target_framework ${{steps.test-args.outputs.dotnet}} -- ${{steps.test-args.outputs.run_settings_args}};
}
shell: pwsh

# Not sure if continue_on_error: true is needed
- name: Perform Tests MacOS/MacOS-arm64 .NET/Mono
uses: nick-fields/retry@v3
if: ${{inputs.os == 'macos' || inputs.os == 'macos-arm64'}}
with:
timeout_minutes: 3
max_attempts: 3
retry_on: timeout
command: |
foreach ($target_framework in ConvertFrom-Json "${{steps.test-args.outputs.target_frameworks}}") {
dotnet test "HarmonyTests/bin/Release/$target_framework/HarmonyTests.dll" -f $target_framework ${{steps.test-args.outputs.dotnet}} -- ${{steps.test-args.outputs.run_settings_args}};
}
shell: pwsh

- name: Upload Test Result
uses: ./.github/actions/test-upload-result
if: ${{(inputs.upload_tests == 'true') && (always() || failure())}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
name: Upload Test Build Output Cache
runs-on: ${{inputs.image}}
if: ${{!inputs.manual_build || inputs.publish}}
timeout-minutes: 8
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-qemu-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
name: .NET ubuntu-arm64 ${{ inputs.target_framework }} ${{ inputs.build_configuration }}
runs-on: ubuntu-latest
continue-on-error: ${{inputs.experimental}}
timeout-minutes: 8
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-qemu-mono.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
name: Mono ubuntu-arm64 ${{ inputs.target_framework }} ${{ inputs.build_configuration }}
runs-on: ubuntu-latest
continue-on-error: ${{inputs.experimental}}
timeout-minutes: 8
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-unix-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
name: .NET ${{inputs.os}}-${{inputs.architecture}} ${{ inputs.target_framework }} ${{inputs.build_configuration}}
runs-on: ${{inputs.image}}
continue-on-error: ${{inputs.experimental}}
timeout-minutes: 8
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-unix-mono.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
name: Mono ${{ inputs.os }}-${{ inputs.architecture }} ${{ inputs.target_framework }} ${{ inputs.build_configuration }}
runs-on: ${{inputs.image}}
continue-on-error: ${{inputs.experimental}}
timeout-minutes: 8
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-windows-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
name: .NET ${{ inputs.architecture }} ${{ inputs.target_framework }} ${{ inputs.build_configuration }}
runs-on: windows-latest
continue-on-error: ${{inputs.experimental}}
timeout-minutes: 8
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-windows-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
name: .NET FX ${{ inputs.architecture }} ${{ inputs.target_framework }} ${{ inputs.build_configuration }}
runs-on: windows-2019
continue-on-error: ${{inputs.experimental}}
timeout-minutes: 8
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-windows-mono.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
name: Mono ${{ inputs.architecture }} ${{ inputs.target_framework }} ${{ inputs.build_configuration }}
runs-on: windows-latest
continue-on-error: ${{inputs.experimental}}
timeout-minutes: 8
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

Expand Down

0 comments on commit f3d3122

Please sign in to comment.