Skip to content

Commit

Permalink
chore: Fixing GitHub workflows (#3538) [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
sebaland authored Feb 23, 2024
1 parent dc86406 commit 5ddf98c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integ_test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Integration Tests
name: Integration Tests (Except DataStore & API)
on:
workflow_dispatch:
push:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/nightly_repeated_unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ jobs:
scheme: ${{ matrix.scheme }}
timeout-minutes: 50
generate_coverage_report: false
retry_on_error: false
other_flags: -test-iterations 100 -run-tests-until-failure
test_iterations_flags: -test-iterations 100 -run-tests-until-failure
9 changes: 7 additions & 2 deletions .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ on:
required: false
type: boolean
default: false
test_iterations_flags:
description: 'The xcodebuild flags used when running the test. Defaults to retrying on failure up to 3 times'
required: false
type: string
default: '-test-iterations 3 -retry-tests-on-failure'

permissions:
contents: read
Expand Down Expand Up @@ -82,7 +87,7 @@ jobs:
cloned_source_packages_path: ~/Library/Developer/Xcode/DerivedData/Amplify
derived_data_path: ${{ github.workspace }}/Build
disable_package_resolution: ${{ steps.dependencies-cache.outputs.cache-hit }}
other_flags: -test-iterations 3 -retry-tests-on-failure
other_flags: ${{ inputs.test_iterations_flags }}

- name: Retry ${{ inputs.platform }} Unit Tests
if: steps.run-tests.outcome=='failure'
Expand All @@ -98,7 +103,7 @@ jobs:
cloned_source_packages_path: ~/Library/Developer/Xcode/DerivedData/Amplify
derived_data_path: ${{ github.workspace }}/Build
disable_package_resolution: true
other_flags: -test-iterations 3 -retry-tests-on-failure
other_flags: ${{ inputs.test_iterations_flags }}

- name: Store Coverage Report File
if: ${{ inputs.generate_coverage_report == true }}
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/run_unit_tests_platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ on:
required: false
type: boolean
default: false
test_iterations_flags:
description: 'The xcodebuild flags used when running the test. Defaults to retrying on failure up to 3 times'
required: false
type: string
default: '-test-iterations 3 -retry-tests-on-failure'

permissions:
contents: read
Expand All @@ -37,4 +42,5 @@ jobs:
scheme: ${{ inputs.scheme }}
platform: ${{ matrix.platform }}
generate_coverage_report: ${{ github.event_name != 'workflow_dispatch' && matrix.platform == 'iOS' && inputs.generate_coverage_report }}
timeout-minutes: ${{ inputs.timeout-minutes }}
timeout-minutes: ${{ inputs.timeout-minutes }}
test_iterations_flags: ${{ inputs.test_iterations_flags }}
Original file line number Diff line number Diff line change
Expand Up @@ -3554,7 +3554,7 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/mattgallagher/CwlPreconditionTesting.git";
requirement = {
kind = upToNextMinorVersion;
kind = upToNextMajorVersion;
minimumVersion = 2.1.0;
};
};
Expand Down

0 comments on commit 5ddf98c

Please sign in to comment.