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: Run All Unit Tests without Building | |
on: | |
- push | |
permissions: | |
contents: read | |
actions: write | |
jobs: | |
build-for-testing: | |
name: Build Amplify-Package for testing | |
runs-on: macos-13 | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [iOS, macOS, tvOS, watchOS] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3 | |
with: | |
persist-credentials: false | |
- name: Get build parameters for ${{ matrix.platform }} | |
id: platform | |
uses: ./.github/composite_actions/get_platform_parameters | |
with: | |
platform: ${{ matrix.platform }} | |
xcode_version: '14.3' | |
- name: Attempt to use the dependencies cache | |
id: dependencies-cache | |
timeout-minutes: 4 | |
continue-on-error: true | |
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | |
with: | |
path: ~/Library/Developer/Xcode/DerivedData/Amplify | |
key: amplify-packages-${{ hashFiles('Package.resolved') }} | |
restore-keys: | | |
amplify-packages- | |
- name: Build Amplify-Package for testing | |
id: run-tests | |
continue-on-error: true | |
uses: ./.github/composite_actions/run_xcodebuild | |
with: | |
scheme: Amplify-Package | |
destination: ${{ steps.platform.outputs.destination }} | |
sdk: ${{ steps.platform.outputs.sdk }} | |
xcode_path: /Applications/Xcode_14.3.app | |
cloned_source_packages_path: ~/Library/Developer/Xcode/DerivedData/Amplify | |
derived_data_path: ${{ github.workspace }}/Build | |
disable_package_resolution: ${{ steps.dependencies-cache.outputs.cache-hit }} | |
build_for_testing: true | |
- name: Save the build cache | |
uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 | |
with: | |
path: ${{ github.workspace }}/Build | |
key: Amplify-${{ matrix.platform }}-cache-${{ github.ref_name }} | |
test-without-building: | |
name: ${{ matrix.scheme }} Unit Tests | |
needs: [build-for-testing] | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [iOS, macOS, tvOS, watchOS] | |
scheme: [ | |
Amplify, | |
AWSPluginsCore, | |
AWSAPIPlugin, | |
AWSCloudWatchLoggingPlugin, | |
AWSCognitoAuthPlugin, | |
AWSDataStorePlugin, | |
AWSLocationGeoPlugin, | |
AWSPredictionsPlugin, | |
AWSPinpointAnalyticsPlugin, | |
AWSPinpointPushNotificationsPlugin, | |
AWSS3StoragePlugin, | |
CoreMLPredictionsPlugin | |
] | |
uses: ./.github/workflows/run_unit_tests.yml | |
with: | |
scheme: ${{ matrix.scheme }} | |
platform: ${{ matrix.platform }} | |
xcode_version: '14.3' | |
generate_coverage_report: ${{ matrix.platform == 'iOS' }} | |
build_cache_key: Amplify-${{ matrix.platform }}-cache-${{ github.ref_name }} | |
test_without_building: true | |
delete-package-cache: | |
if: github.ref_name != 'main' | |
runs-on: ubuntu-latest | |
needs: [test-without-building] | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [iOS, macOS, tvOS, watchOS] | |
steps: | |
- run: | | |
gh cache delete Amplify-${{ matrix.platform }}-cache-${{ github.ref_name }} | |
shell: bash |