Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/integ-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
identifier:
required: true
type: string
pull_request_target:
pull_request:
branches:
- main

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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]}
6 changes: 3 additions & 3 deletions .github/workflows/report-code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -81,16 +81,18 @@ 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
if: ${{ matrix.scheme == 'AWSCore' }}
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]}
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand All @@ -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() {
Expand Down
Loading