health observation upload local persistence layer #707
Workflow file for this run
This file contains hidden or 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
| # | |
| # This source file is part of the My Heart Counts iOS application based on the Stanford Spezi Template Application project | |
| # | |
| # SPDX-FileCopyrightText: 2025 Stanford University and the project authors (see CONTRIBUTORS.md) | |
| # | |
| # SPDX-License-Identifier: MIT | |
| # | |
| name: Build and Test | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| workflow_call: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| mhc_app_unit_tests: | |
| name: App Unit Tests | |
| uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 | |
| with: | |
| runsonlabels: '["macOS", "self-hosted"]' | |
| scheme: MyHeartCounts | |
| testplan: MyHeartCounts Unit Tests | |
| resultBundle: MHC-App-UnitTests.xcresult | |
| artifactname: MHC-App-UnitTests.xcresult | |
| mhc_app_ui_tests: | |
| name: App UI Tests | |
| uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 | |
| permissions: | |
| contents: read | |
| with: | |
| runsonlabels: '["macOS", "self-hosted"]' | |
| artifactname: MHC-App-UITests.xcresult | |
| setupfirebaseemulator: true | |
| checkout_submodules: true | |
| customcommand: "cd ./MyHeartCounts-Firebase && npm install && npm run prepare && firebase emulators:exec 'cd .. && fastlane uitest'" | |
| secrets: | |
| GOOGLE_APPLICATION_CREDENTIALS_BASE64: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_BASE64 }} | |
| mhc_utils_unit_tests: | |
| name: Utils Unit Tests (${{ matrix.platform.name }} ${{ matrix.config }}) | |
| uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 | |
| strategy: | |
| matrix: | |
| config: [Debug, Release] | |
| platform: | |
| - name: iOS | |
| destination: 'platform=iOS Simulator,name=iPhone 17 Pro' | |
| - name: macOS | |
| destination: 'platform=macOS,arch=arm64' | |
| with: | |
| runsonlabels: '["macOS", "self-hosted"]' | |
| path: MyHeartCountsShared | |
| scheme: MyHeartCountsShared-Package | |
| destination: ${{ matrix.platform.destination }} | |
| resultBundle: ${{ format('MHC-Shared-UnitTests-{0}-{1}.xcresult', matrix.platform.name, matrix.config) }} | |
| artifactname: ${{ format('MHC-Shared-UnitTests-{0}-{1}.xcresult', matrix.platform.name, matrix.config) }} | |
| mhc_utils_unit_tests_linux: | |
| name: Utils Unit Tests (Linux ${{ matrix.config }}) | |
| uses: StanfordBDHG/.github/.github/workflows/swift-test.yml@v2 | |
| strategy: | |
| matrix: | |
| config: [Debug, Release] | |
| fail-fast: false | |
| with: | |
| path: MyHeartCountsShared | |
| artifact_name: ${{ format('MHC-Shared-UnitTests-Linux-{0}.lcov', matrix.config) }} | |
| uploadcoveragereport: | |
| name: Upload Coverage Report | |
| needs: [mhc_app_unit_tests, mhc_app_ui_tests, mhc_utils_unit_tests, mhc_utils_unit_tests_linux] | |
| uses: StanfordBDHG/.github/.github/workflows/create-and-upload-coverage-report.yml@v2 | |
| permissions: | |
| contents: read | |
| with: | |
| coveragereports: MHC-*.xcresult | |
| coveragereports_lcov: MHC-Shared-UnitTests-Linux-*.lcov | |
| secrets: | |
| token: ${{ secrets.CODECOV_TOKEN }} |