Skip to content

Commit 5ddf98c

Browse files
authored
chore: Fixing GitHub workflows (#3538) [skip ci]
1 parent dc86406 commit 5ddf98c

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

.github/workflows/integ_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Integration Tests
1+
name: Integration Tests (Except DataStore & API)
22
on:
33
workflow_dispatch:
44
push:

.github/workflows/nightly_repeated_unittest.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,4 @@ jobs:
3737
scheme: ${{ matrix.scheme }}
3838
timeout-minutes: 50
3939
generate_coverage_report: false
40-
retry_on_error: false
41-
other_flags: -test-iterations 100 -run-tests-until-failure
40+
test_iterations_flags: -test-iterations 100 -run-tests-until-failure

.github/workflows/run_unit_tests.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ on:
2727
required: false
2828
type: boolean
2929
default: false
30+
test_iterations_flags:
31+
description: 'The xcodebuild flags used when running the test. Defaults to retrying on failure up to 3 times'
32+
required: false
33+
type: string
34+
default: '-test-iterations 3 -retry-tests-on-failure'
3035

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

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

103108
- name: Store Coverage Report File
104109
if: ${{ inputs.generate_coverage_report == true }}

.github/workflows/run_unit_tests_platforms.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ on:
1616
required: false
1717
type: boolean
1818
default: false
19+
test_iterations_flags:
20+
description: 'The xcodebuild flags used when running the test. Defaults to retrying on failure up to 3 times'
21+
required: false
22+
type: string
23+
default: '-test-iterations 3 -retry-tests-on-failure'
1924

2025
permissions:
2126
contents: read
@@ -37,4 +42,5 @@ jobs:
3742
scheme: ${{ inputs.scheme }}
3843
platform: ${{ matrix.platform }}
3944
generate_coverage_report: ${{ github.event_name != 'workflow_dispatch' && matrix.platform == 'iOS' && inputs.generate_coverage_report }}
40-
timeout-minutes: ${{ inputs.timeout-minutes }}
45+
timeout-minutes: ${{ inputs.timeout-minutes }}
46+
test_iterations_flags: ${{ inputs.test_iterations_flags }}

AmplifyPlugins/API/Tests/APIHostApp/APIHostApp.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3554,7 +3554,7 @@
35543554
isa = XCRemoteSwiftPackageReference;
35553555
repositoryURL = "https://github.com/mattgallagher/CwlPreconditionTesting.git";
35563556
requirement = {
3557-
kind = upToNextMinorVersion;
3557+
kind = upToNextMajorVersion;
35583558
minimumVersion = 2.1.0;
35593559
};
35603560
};

0 commit comments

Comments
 (0)