Added shields.io badges #36
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 | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
defaults: | |
run: | |
shell: zsh {0} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
LANG: "en_US.UTF-8" | |
LANGUAGE: "en_US.UTF-8" | |
LC_ALL: "en_US.UTF-8" | |
SCHEME: "BlackBoxFirebasePerformance" | |
jobs: | |
unit-tests-spm: | |
runs-on: 'macos-13' | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
DESTINATION: ["platform=iOS Simulator,name=iPhone 11", "platform=tvOS Simulator,name=Apple TV"] | |
steps: | |
- name: Get source code | |
uses: actions/checkout@v3 | |
- name: Prepare Environment for App Build | |
uses: ./.github/actions/prepare_env_app_build | |
- name: Resolve Dependencies | |
run: xcodebuild -resolvePackageDependencies | |
- name: Create Simulators | |
run: | | |
xcrun simctl delete all | |
xcrun simctl create "iPhone 11" com.apple.CoreSimulator.SimDeviceType.iPhone-11 | |
xcrun simctl create "Apple TV" com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-3rd-generation-4K | |
- name: Build | |
run: > | |
xcodebuild build-for-testing | |
-scheme ${{ env.SCHEME }} | |
-destination '${{ matrix.DESTINATION }}' | |
-quiet | |
- name: Test | |
if: ${{ !contains(matrix.DESTINATION, 'watchOS') }} # watchOS Simulator is too slow on GitHub-hosted Runners, expectation-related tests are flaky | |
run: > | |
xcodebuild test | |
-scheme ${{ env.SCHEME }} | |
-destination '${{ matrix.DESTINATION }}' | |
-quiet | |
# This allows us to have a branch protection rule for tests and deploys with matrix | |
status-for-matrix: | |
runs-on: 'macos-latest' | |
needs: ['unit-tests-spm'] | |
if: always() | |
steps: | |
- name: Successful deploy | |
if: ${{ !(contains(needs.*.result, 'failure')) }} | |
run: exit 0 | |
- name: Failing deploy | |
if: ${{ contains(needs.*.result, 'failure') }} | |
run: exit 1 |