Skip to content

Commit

Permalink
chore: Fixing unit tests workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ruisebas committed Oct 12, 2023
1 parent efc0061 commit 38053e1
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run_xcodebuild_test_platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ${{ github.workspace }}/Build
key: ${{ env.SCHEME }}-iOS-latest-build-main
key: ${{ env.SCHEME }}-iOS-latest-build-maindsadasdas
- name: Run iOS Test Suite
id: run-tests
continue-on-error: ${{ env.RETRY_ON_ERROR == 'true' }}
Expand Down
70 changes: 35 additions & 35 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,37 @@ concurrency:
cancel-in-progress: ${{ github.ref_name != 'main'}}

jobs:
unit-tests-without-coverage:
name: ${{ matrix.scheme }} Unit Tests
strategy:
fail-fast: false
matrix:
scheme: [
InternalAWSPinpointUnitTests
]
uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
with:
scheme: ${{ matrix.scheme }}
generate_coverage_report: false
# unit-tests-without-coverage:
# name: ${{ matrix.scheme }} Unit Tests
# strategy:
# fail-fast: false
# matrix:
# scheme: [
# InternalAWSPinpointUnitTests
# ]
# uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
# with:
# scheme: ${{ matrix.scheme }}
# generate_coverage_report: false

unit-tests-with-coverage:
name: ${{ matrix.scheme }} Unit Tests
strategy:
fail-fast: false
matrix:
scheme: [
Amplify,
AWSPluginsCore,
AWSAPIPlugin,
AWSCloudWatchLoggingPlugin,
# Amplify,
# AWSPluginsCore,
# AWSAPIPlugin,
# AWSCloudWatchLoggingPlugin,
AWSCognitoAuthPlugin,
AWSDataStorePlugin,
AWSLocationGeoPlugin,
AWSPredictionsPlugin,
AWSPinpointAnalyticsPlugin,
AWSPinpointPushNotificationsPlugin,
AWSS3StoragePlugin,
CoreMLPredictionsPlugin
# AWSDataStorePlugin,
# AWSLocationGeoPlugin,
# AWSPredictionsPlugin,
# AWSPinpointAnalyticsPlugin,
# AWSPinpointPushNotificationsPlugin,
# AWSS3StoragePlugin,
# CoreMLPredictionsPlugin
]
uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
with:
Expand All @@ -65,18 +65,18 @@ jobs:
fail-fast: false
matrix:
file: [
{ scheme: Amplify, flags: 'Amplify,unit_tests' },
{ scheme: AWSPluginsCore, flags: 'AWSPluginsCore,unit_tests' },
{ scheme: AWSAPIPlugin, flags: 'API_plugin_unit_test,unit_tests' },
{ scheme: AWSCloudWatchLoggingPlugin, flags: 'Logging_plugin_unit_test,unit_tests' },
# { scheme: Amplify, flags: 'Amplify,unit_tests' },
# { scheme: AWSPluginsCore, flags: 'AWSPluginsCore,unit_tests' },
# { scheme: AWSAPIPlugin, flags: 'API_plugin_unit_test,unit_tests' },
# { scheme: AWSCloudWatchLoggingPlugin, flags: 'Logging_plugin_unit_test,unit_tests' },
{ scheme: AWSCognitoAuthPlugin, flags: 'Auth_plugin_unit_test,unit_tests' },
{ scheme: AWSDataStorePlugin, flags: 'DataStore_plugin_unit_test,unit_tests' },
{ scheme: AWSLocationGeoPlugin, flags: 'Geo_plugin_unit_test,unit_tests' },
{ scheme: AWSPredictionsPlugin, flags: 'Predictions_plugin_unit_test,unit_tests' },
{ scheme: AWSPinpointAnalyticsPlugin, flags: 'Analytics_plugin_unit_test,unit_tests' },
{ scheme: AWSPinpointPushNotificationsPlugin, flags: 'PushNotifications_plugin_unit_test,unit_tests' },
{ scheme: AWSS3StoragePlugin, flags: 'Storage_plugin_unit_test,unit_tests' },
{ scheme: CoreMLPredictionsPlugin, flags: 'CoreMLPredictions_plugin_unit_test,unit_tests' }
# { scheme: AWSDataStorePlugin, flags: 'DataStore_plugin_unit_test,unit_tests' },
# { scheme: AWSLocationGeoPlugin, flags: 'Geo_plugin_unit_test,unit_tests' },
# { scheme: AWSPredictionsPlugin, flags: 'Predictions_plugin_unit_test,unit_tests' },
# { scheme: AWSPinpointAnalyticsPlugin, flags: 'Analytics_plugin_unit_test,unit_tests' },
# { scheme: AWSPinpointPushNotificationsPlugin, flags: 'PushNotifications_plugin_unit_test,unit_tests' },
# { scheme: AWSS3StoragePlugin, flags: 'Storage_plugin_unit_test,unit_tests' },
# { scheme: CoreMLPredictionsPlugin, flags: 'CoreMLPredictions_plugin_unit_test,unit_tests' }
]
uses: ./.github/workflows/upload_coverage_report.yml
with:
Expand All @@ -89,7 +89,7 @@ jobs:
if: ${{ !cancelled() }}
needs: [
unit-tests-with-coverage,
unit-tests-without-coverage
# unit-tests-without-coverage
]
env:
EXIT_CODE: ${{ contains(needs.*.result, 'failure') && 1 || 0 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class AWSAuthCognitoSessionTests: XCTestCase {
awsCredentialsResult: .failure(error),
cognitoTokensResult: .success(tokens))

let cognitoTokens = try! session.getCognitoTokens().get() as! AWSCognitoUserPoolTokens
let cognitoTokens = try! session.getCognitoTokens().get() as! String
XCTAssertFalse(cognitoTokens.doesExpire())
}

Expand Down

0 comments on commit 38053e1

Please sign in to comment.