chore: Cleaning up scheme build caches when a rerun is successful. Al… #288
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: | ||
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: | ||
unit-tests-without-coverage: | ||
Check failure on line 23 in .github/workflows/unit_test.yml GitHub Actions / Unit Tests | AllInvalid workflow file
|
||
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, | ||
AWSCognitoAuthPlugin, | ||
AWSDataStorePlugin, | ||
AWSLocationGeoPlugin, | ||
AWSPredictionsPlugin, | ||
AWSPinpointAnalyticsPlugin, | ||
AWSPinpointPushNotificationsPlugin, | ||
AWSS3StoragePlugin, | ||
CoreMLPredictionsPlugin | ||
] | ||
uses: ./.github/workflows/run_xcodebuild_test_platforms.yml | ||
with: | ||
scheme: ${{ matrix.scheme }} | ||
generate_coverage_report: true | ||
report-coverage: | ||
name: ${{ matrix.file.scheme }} Coverage Report | ||
needs: [unit-tests-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' }, | ||
{ scheme: CoreMLPredictionsPlugin, flags: 'CoreMLPredictions_plugin_unit_test,unit_tests' } | ||
] | ||
uses: ./.github/workflows/upload_coverage_report.yml | ||
with: | ||
scheme: ${{ matrix.file.scheme }} | ||
flags: ${{ matrix.file.flags }} | ||
unit-test-pass-confirmation: | ||
runs-on: ubuntu-latest | ||
name: Confirm Passing Unit Tests | ||
if: ${{ !cancelled() }} | ||
needs: [ | ||
unit-tests-with-coverage, | ||
unit-tests-without-coverage | ||
] | ||
env: | ||
EXIT_CODE: ${{ contains(needs.*.result, 'failure') && 1 || 0 }} | ||
steps: | ||
- run: exit $EXIT_CODE |