Merge branch 'main' into feat/email-mfa-support-public #1857
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit Tests | All | |
on: | |
workflow_call: | |
inputs: | |
identifier: | |
required: true | |
type: string | |
workflow_dispatch: | |
inputs: | |
ios: | |
description: '📱 iOS' | |
required: true | |
default: true | |
type: boolean | |
macos: | |
description: '💻 macOS' | |
required: true | |
default: true | |
type: boolean | |
tvos: | |
description: '📺 tvOS' | |
required: true | |
default: true | |
type: boolean | |
watchos: | |
description: '⌚️ watchOS' | |
required: true | |
default: true | |
type: boolean | |
push: | |
branches-ignore: | |
- main | |
- release | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ inputs.identifier || github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: ${{ github.ref_name != 'main'}} | |
jobs: | |
targets-without-coverage: | |
name: ${{ matrix.scheme }} Unit Tests | |
strategy: | |
fail-fast: false | |
matrix: | |
scheme: [ | |
InternalAWSPinpointUnitTests | |
] | |
uses: ./.github/workflows/run_unit_tests_platforms.yml | |
with: | |
scheme: ${{ matrix.scheme }} | |
generate_coverage_report: false | |
targets-with-coverage: | |
name: ${{ matrix.scheme }} Unit Tests | |
strategy: | |
fail-fast: false | |
matrix: | |
scheme: [ | |
Amplify, | |
AWSPluginsCore, | |
AWSAPIPlugin, | |
AWSCloudWatchLoggingPlugin, | |
AWSCognitoAuthPlugin, | |
AWSDataStorePlugin, | |
AWSLocationGeoPlugin, | |
AWSPredictionsPlugin, | |
AWSPinpointAnalyticsPlugin, | |
AWSPinpointPushNotificationsPlugin, | |
AWSS3StoragePlugin | |
] | |
uses: ./.github/workflows/run_unit_tests_platforms.yml | |
with: | |
scheme: ${{ matrix.scheme }} | |
generate_coverage_report: ${{ vars.DISABLE_COVERAGE_REPORT != 'true' }} | |
report-coverage: | |
if: ${{ vars.DISABLE_COVERAGE_REPORT != 'true' }} | |
name: ${{ matrix.file.scheme }} Unit Tests | |
needs: [targets-with-coverage] | |
strategy: | |
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: 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' } | |
] | |
uses: ./.github/workflows/upload_coverage_report.yml | |
with: | |
scheme: ${{ matrix.file.scheme }} | |
flags: ${{ matrix.file.flags }} | |
secrets: inherit | |
unit-test-pass-confirmation: | |
runs-on: ubuntu-latest | |
name: Confirm Passing Unit Tests | |
if: ${{ !cancelled() }} | |
needs: [ | |
targets-with-coverage, | |
targets-without-coverage | |
] | |
env: | |
EXIT_CODE: ${{ contains(needs.*.result, 'failure') && 1 || 0 }} | |
steps: | |
- run: exit $EXIT_CODE |