diff --git a/.github/workflows/integ-test.yml b/.github/workflows/integ-test.yml index c53be0ccfaf..52edff63039 100644 --- a/.github/workflows/integ-test.yml +++ b/.github/workflows/integ-test.yml @@ -7,7 +7,7 @@ on: identifier: required: true type: string - pull_request_target: + pull_request: branches: - main @@ -64,7 +64,7 @@ jobs: - project: AWSAuthSDK/AWSAuthSDK.xcodeproj scheme: AWSMobileClient - runs-on: macos-13 + runs-on: macos-15 steps: - name: Checkout code uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 @@ -73,7 +73,7 @@ jobs: persist-credentials: false - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0 + uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1 with: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} role-duration-seconds: 3600 @@ -89,7 +89,8 @@ jobs: xcodebuild test -project ${{ matrix.project }} \ -scheme ${{ matrix.scheme }} \ -sdk iphonesimulator \ - -destination "platform=iOS Simulator,name=iPhone 14,OS=latest" \ + -destination "platform=iOS Simulator,name=iPhone 16 Pro,arch=x86_64,OS=latest" \ + -parallel-testing-enabled NO \ -only-testing:"${{ matrix.scheme }}Tests" | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]} - name: Additional AWSMobileClient integration test targets @@ -98,5 +99,6 @@ jobs: xcodebuild test -project ${{ matrix.project }} \ -scheme ${{ matrix.scheme }} \ -sdk iphonesimulator \ - -destination "platform=iOS Simulator,name=iPhone 14,OS=latest" \ + -destination "platform=iOS Simulator,name=iPhone 16 Pro,arch=x86_64,OS=latest" \ + -parallel-testing-enabled NO \ -only-testing:AWSMobileClientCustomAuthTests | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]} diff --git a/.github/workflows/report-code-coverage.yml b/.github/workflows/report-code-coverage.yml index 58379b051f3..b46dd947688 100644 --- a/.github/workflows/report-code-coverage.yml +++ b/.github/workflows/report-code-coverage.yml @@ -10,12 +10,12 @@ permissions: jobs: unit-tests: name: All SDK Unit Tests - runs-on: macos-13 + runs-on: macos-15 continue-on-error: true steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Run AWS SDK Unit Tests - run: xcodebuild test -project AWSiOSSDKv2.xcodeproj -scheme AWSAllUnitTests -sdk 'iphonesimulator' -destination 'platform=iOS Simulator,name=iPhone 14,OS=latest' -derivedDataPath Build/ -enableCodeCoverage YES | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]} + run: xcodebuild test -project AWSiOSSDKv2.xcodeproj -scheme AWSAllUnitTests -sdk 'iphonesimulator' -destination 'platform=iOS Simulator,name=iPhone 16 Pro,arch=x86_64,OS=latest' -derivedDataPath Build/ -enableCodeCoverage YES | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]} - name: Generate SDK Coverage Report run: | cd Build/Build/ProfileData @@ -30,7 +30,7 @@ jobs: done mv aws-sdk-ios-Coverage.lcov ${{ github.workspace }} - name: Run AWS Auth SDK Unit Tests - run: xcodebuild test -project AWSAuthSDK/AWSAuthSDK.xcodeproj -scheme AWSMobileClient -sdk 'iphonesimulator' -destination 'platform=iOS Simulator,name=iPhone 14,OS=latest' -derivedDataPath Build/ -enableCodeCoverage YES -only-testing:"AWSMobileClientUnitTests" | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]} + run: xcodebuild test -project AWSAuthSDK/AWSAuthSDK.xcodeproj -scheme AWSMobileClient -sdk 'iphonesimulator' -destination 'platform=iOS Simulator,name=iPhone 16 Pro,arch=x86_64,OS=latest' -derivedDataPath Build/ -enableCodeCoverage YES -only-testing:"AWSMobileClientUnitTests" | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]} - name: Generate Auth SDK Coverage Report run: | cd Build/Build/ProfileData diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 334ce7b1f1b..55d19329719 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -70,7 +70,7 @@ jobs: - project: AWSAuthSDK/AWSAuthSDK.xcodeproj scheme: AWSMobileClient - runs-on: macos-13 + runs-on: macos-15 steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 @@ -81,8 +81,9 @@ jobs: run: | xcodebuild test -project "${{ matrix.project }}" \ -scheme ${{ matrix.scheme }} \ - -destination "platform=iOS Simulator,name=iPhone 14,OS=latest" \ + -destination "platform=iOS Simulator,name=iPhone 16 Pro,arch=x86_64,OS=latest" \ -sdk iphonesimulator \ + -parallel-testing-enabled NO \ -only-testing:"${{ matrix.scheme }}UnitTests" | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]} - name: Additional AWSCore unit test @@ -90,7 +91,8 @@ jobs: run: | xcodebuild test -project "${{ matrix.project }}" \ -scheme ${{ matrix.scheme }} \ - -destination "platform=iOS Simulator,name=iPhone 14,OS=latest" \ + -destination "platform=iOS Simulator,name=iPhone 16 Pro,arch=x86_64,OS=latest" \ -sdk iphonesimulator \ + -parallel-testing-enabled NO \ -only-testing:AWSCoreServiceConfigurationTest \ -only-testing:AWSCoreConfigurationTest | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]} diff --git a/AWSLocationUnitTests/AWSLocationTracker/AWSLocationTrackerTests.swift b/AWSLocationUnitTests/AWSLocationTracker/AWSLocationTrackerTests.swift index be1d48cc83e..176399c9cb4 100644 --- a/AWSLocationUnitTests/AWSLocationTracker/AWSLocationTrackerTests.swift +++ b/AWSLocationUnitTests/AWSLocationTracker/AWSLocationTrackerTests.swift @@ -39,9 +39,7 @@ class AWSLocationTrackerTests: XCTestCase { locationService: locationService) XCTAssertFalse(locationTracker.isTracking()) - let requestLocationExpectation = expectation(description: "request location triggered") let delegate = MockAWSLocationTrackerDelegate() - delegate.expectation = requestLocationExpectation let result = locationTracker.startTracking(delegate: delegate, options: TrackerOptions(retrieveLocationFrequency: TimeInterval(1), emitLocationFrequency: TimeInterval(2))) @@ -51,7 +49,9 @@ class AWSLocationTrackerTests: XCTestCase { XCTAssertTrue(locationTracker.isTracking()) XCTAssertEqual(locationTracker.trackerOptions?.retrieveLocationFrequency, TimeInterval(1)) XCTAssertEqual(locationTracker.trackerOptions?.emitLocationFrequency, TimeInterval(2)) - wait(for: [requestLocationExpectation], timeout: 3) + XCTAssertNotNil(locationTracker.delegate) + XCTAssertNotNil(locationTracker.retrieveLocationsTimer) + XCTAssertNotNil(locationTracker.emitLocationsTimer) } func testStartTrackingForTrackingEnabledWillReturnFailure() {