From f992c6f85e56ff45142d107286616afaa8660e12 Mon Sep 17 00:00:00 2001 From: Paul Schmiedmayer Date: Fri, 12 Jun 2026 20:15:53 -0700 Subject: [PATCH 01/13] Test Deployment --- .github/workflows/deployment.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 8f15e1c9..e113f885 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -119,16 +119,16 @@ jobs: fi echo "buildnumber: ${{ inputs.buildnumber }}" echo "releasenotes: ${{ inputs.releasenotes }}" - test: - name: Build and Test - needs: determineenvironment - uses: ./.github/workflows/build-and-test.yml - permissions: - contents: read - secrets: inherit + # test: + # name: Build and Test + # needs: determineenvironment + # uses: ./.github/workflows/build-and-test.yml + # permissions: + # contents: read + # secrets: inherit testflight: name: iOS App TestFlight Deployment - needs: [determineenvironment, vars, test] + needs: [determineenvironment, vars] #, test] uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 permissions: contents: read From 8c40854274f7e5622ba6bda92ddb1a02b28d40f9 Mon Sep 17 00:00:00 2001 From: Paul Schmiedmayer Date: Sat, 13 Jun 2026 00:36:21 -0700 Subject: [PATCH 02/13] Update CI Setup --- .github/workflows/build-and-test.yml | 10 +++++----- .github/workflows/deployment.yml | 2 +- .github/workflows/monthly-markdown-link-check.yml.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/static-analysis.yml | 10 +++++----- .gitmodules | 4 ++-- MyHeartCounts.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/swiftpm/Package.resolved | 2 +- MyHeartCountsUITests/BasicAppUsage.swift | 2 +- README.md | 8 ++++---- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index f0fa044d..4924e9e9 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -20,7 +20,7 @@ concurrency: jobs: mhc_app_unit_tests: name: App Unit Tests - uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 + uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild-fastlane.yml@v0.1 with: runsonlabels: '["macOS", "self-hosted"]' scheme: MyHeartCounts @@ -29,7 +29,7 @@ jobs: artifactname: MHC-App-UnitTests.xcresult mhc_app_ui_tests: name: App UI Tests - uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 + uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild-fastlane.yml@v0.1 permissions: contents: read with: @@ -42,7 +42,7 @@ jobs: 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 + uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild-fastlane.yml@v0.1 strategy: matrix: config: [Debug, Release] @@ -60,7 +60,7 @@ jobs: 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 + uses: SchmiedmayerLab/.github/.github/workflows/swift-test.yml@v0.1 strategy: matrix: config: [Debug, Release] @@ -71,7 +71,7 @@ jobs: 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 + uses: SchmiedmayerLab/.github/.github/workflows/coverage.yml@v0.1 permissions: contents: read with: diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index e113f885..65c06187 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -129,7 +129,7 @@ jobs: testflight: name: iOS App TestFlight Deployment needs: [determineenvironment, vars] #, test] - uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 + uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild-fastlane.yml@v0.1 permissions: contents: read with: diff --git a/.github/workflows/monthly-markdown-link-check.yml.yml b/.github/workflows/monthly-markdown-link-check.yml.yml index 04902134..436247f7 100644 --- a/.github/workflows/monthly-markdown-link-check.yml.yml +++ b/.github/workflows/monthly-markdown-link-check.yml.yml @@ -16,6 +16,6 @@ on: jobs: markdown_link_check: name: Markdown Link Check - uses: StanfordBDHG/.github/.github/workflows/markdown-link-check.yml@v2 + uses: SchmiedmayerLab/.github/.github/workflows/markdown-links.yml@v0.1 permissions: contents: read diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4e9116b7..49ed3df9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ concurrency: jobs: formatreleasenotes: name: Format Release Notes - uses: StanfordBDHG/.github/.github/workflows/format-release-notes.yml@v2 + uses: SchmiedmayerLab/.github/.github/workflows/format-release-notes.yml@v0.1 with: release-tag: ${{ github.event.release.tag_name }} repository: ${{ github.repository }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 1e5261d1..9cc0a7ca 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -20,17 +20,17 @@ concurrency: jobs: reuse_action: name: REUSE Compliance Check - uses: StanfordBDHG/.github/.github/workflows/reuse.yml@v2 + uses: SchmiedmayerLab/.github/.github/workflows/reuse.yml@v0.1 permissions: contents: read swiftlint: name: SwiftLint - uses: StanfordBDHG/.github/.github/workflows/swiftlint.yml@v2 + uses: SchmiedmayerLab/.github/.github/workflows/swiftlint.yml@v0.1 permissions: contents: read periphery: name: Periphery - uses: StanfordBDHG/.github/.github/workflows/periphery.yml@v2 + uses: SchmiedmayerLab/.github/.github/workflows/periphery.yml@v0.1 permissions: contents: read with: @@ -38,12 +38,12 @@ jobs: strict: false markdownlinkcheck: name: Markdown Link Check - uses: StanfordBDHG/.github/.github/workflows/markdown-link-check.yml@v2 + uses: SchmiedmayerLab/.github/.github/workflows/markdown-links.yml@v0.1 permissions: contents: read codeql: name: CodeQL - uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 + uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild-fastlane.yml@v0.1 permissions: security-events: write actions: read diff --git a/.gitmodules b/.gitmodules index 1d4b7f0c..ef686ca6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "MyHeartCounts-Firebase"] path = MyHeartCounts-Firebase - url = https://github.com/StanfordBDHG/MyHeartCounts-Firebase.git + url = https://github.com/SchmiedmayerLab/MyHeartCounts-Firebase.git [submodule "MyHeartCounts-StudyDefinitions"] path = MyHeartCounts-StudyDefinitions - url = https://github.com/StanfordBDHG/MyHeartCounts-StudyDefinitions.git + url = https://github.com/SchmiedmayerLab/MyHeartCounts-StudyDefinitions.git diff --git a/MyHeartCounts.xcodeproj/project.pbxproj b/MyHeartCounts.xcodeproj/project.pbxproj index 548db350..13642cda 100644 --- a/MyHeartCounts.xcodeproj/project.pbxproj +++ b/MyHeartCounts.xcodeproj/project.pbxproj @@ -1353,7 +1353,7 @@ }; 804C11E22ECA380D004783C3 /* XCRemoteSwiftPackageReference "MyHeartCounts-StudyDefinitions" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/StanfordBDHG/MyHeartCounts-StudyDefinitions.git"; + repositoryURL = "https://github.com/SchmiedmayerLab/MyHeartCounts-StudyDefinitions.git"; requirement = { kind = upToNextMajorVersion; minimumVersion = 0.1.16; diff --git a/MyHeartCounts.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/MyHeartCounts.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 8e2f60e8..d628b870 100644 --- a/MyHeartCounts.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/MyHeartCounts.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -139,7 +139,7 @@ { "identity" : "myheartcounts-studydefinitions", "kind" : "remoteSourceControl", - "location" : "https://github.com/StanfordBDHG/MyHeartCounts-StudyDefinitions.git", + "location" : "https://github.com/SchmiedmayerLab/MyHeartCounts-StudyDefinitions.git", "state" : { "revision" : "5ccee3145fa9608c01a6dee715bf231dd394a856", "version" : "0.1.19" diff --git a/MyHeartCountsUITests/BasicAppUsage.swift b/MyHeartCountsUITests/BasicAppUsage.swift index 562b9215..0fc2c354 100644 --- a/MyHeartCountsUITests/BasicAppUsage.swift +++ b/MyHeartCountsUITests/BasicAppUsage.swift @@ -93,7 +93,7 @@ final class BasicAppUsage: MHCTestCase, @unchecked Sendable { @MainActor func testWithdrawal() throws { - throw XCTSkip("needs https://github.com/StanfordBDHG/MyHeartCounts-Firebase/pull/111") + throw XCTSkip("needs https://github.com/SchmiedmayerLab/MyHeartCounts-Firebase/pull/111") try launchAppAndEnrollIntoStudy(locale: .enUS) openAccountSheet() app.swipeUp() diff --git a/README.md b/README.md index b6811ae0..6170c085 100644 --- a/README.md +++ b/README.md @@ -119,12 +119,12 @@ In order to run and develop the My Heart Counts app locally, you'll need the fol ## Contributing -Contributions to this project are welcome. Please make sure to read the [contribution guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md) and the [contributor covenant code of conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md) first. +Contributions to this project are welcome. Please make sure to read the [contribution guidelines](https://github.com/SchmiedmayerLab/.github/blob/main/CONTRIBUTING.md) and the [contributor covenant code of conduct](https://github.com/SchmiedmayerLab/.github/blob/main/CODE_OF_CONDUCT.md) first. ## License -This project is licensed under the MIT License. See [Licenses](https://github.com/StanfordBDHG/MyHeartCounts-iOS/tree/main/LICENSES) for more information. +This project is licensed under the MIT License. See [Licenses](https://github.com/SchmiedmayerLab/MyHeartCounts-iOS/tree/main/LICENSES) for more information. -![Stanford Biodesign Footer](https://raw.githubusercontent.com/StanfordBDHG/.github/main/assets/biodesign-footer-light.png#gh-light-mode-only) -![Stanford Biodesign Footer](https://raw.githubusercontent.com/StanfordBDHG/.github/main/assets/biodesign-footer-dark.png#gh-dark-mode-only) +![Stanford Biodesign Footer](https://raw.githubusercontent.com/SchmiedmayerLab/.github/main/assets/biodesign-footer-light.png#gh-light-mode-only) +![Stanford Biodesign Footer](https://raw.githubusercontent.com/SchmiedmayerLab/.github/main/assets/biodesign-footer-dark.png#gh-dark-mode-only) From 6d725f49fafb6486f2052c22617e52f10844adf4 Mon Sep 17 00:00:00 2001 From: Paul Schmiedmayer Date: Sat, 13 Jun 2026 00:43:52 -0700 Subject: [PATCH 03/13] Update Actions --- .github/workflows/build-and-test.yml | 10 ++++++++++ .github/workflows/deployment.yml | 9 +++++---- ...k-check.yml.yml => monthly-markdown-link-check.yml} | 0 .github/workflows/release.yml | 2 ++ 4 files changed, 17 insertions(+), 4 deletions(-) rename .github/workflows/{monthly-markdown-link-check.yml.yml => monthly-markdown-link-check.yml} (100%) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 4924e9e9..653c4c72 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -21,6 +21,9 @@ jobs: mhc_app_unit_tests: name: App Unit Tests uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild-fastlane.yml@v0.1 + permissions: + contents: read + security-events: write with: runsonlabels: '["macOS", "self-hosted"]' scheme: MyHeartCounts @@ -32,6 +35,7 @@ jobs: uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild-fastlane.yml@v0.1 permissions: contents: read + security-events: write with: runsonlabels: '["macOS", "self-hosted"]' artifactname: MHC-App-UITests.xcresult @@ -43,6 +47,9 @@ jobs: mhc_utils_unit_tests: name: Utils Unit Tests (${{ matrix.platform.name }} ${{ matrix.config }}) uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild-fastlane.yml@v0.1 + permissions: + contents: read + security-events: write strategy: matrix: config: [Debug, Release] @@ -61,6 +68,8 @@ jobs: mhc_utils_unit_tests_linux: name: Utils Unit Tests (Linux ${{ matrix.config }}) uses: SchmiedmayerLab/.github/.github/workflows/swift-test.yml@v0.1 + permissions: + contents: read strategy: matrix: config: [Debug, Release] @@ -73,6 +82,7 @@ jobs: needs: [mhc_app_unit_tests, mhc_app_ui_tests, mhc_utils_unit_tests, mhc_utils_unit_tests_linux] uses: SchmiedmayerLab/.github/.github/workflows/coverage.yml@v0.1 permissions: + actions: read contents: read with: coveragereports: MHC-*.xcresult diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 65c06187..c47a49fd 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -82,10 +82,10 @@ jobs: id: determineenvironment run: | if [[ -z "${{ inputs.environment }}" ]]; then - echo "environment=staging" >> $GITHUB_OUTPUT + echo "environment=staging" >> "$GITHUB_OUTPUT" echo "environment: staging" else - echo "environment=${{ inputs.environment }}" >> $GITHUB_OUTPUT + echo "environment=${{ inputs.environment }}" >> "$GITHUB_OUTPUT" echo "environment: ${{ inputs.environment }}" fi vars: @@ -111,10 +111,10 @@ jobs: PATCH=$((PATCH + 1)) NEW_VERSION="${MAJOR}.${MINOR}.${PATCH}" - echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT + echo "version=$NEW_VERSION" >> "$GITHUB_OUTPUT" echo "version: $NEW_VERSION" else - echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT + echo "version=${{ inputs.version }}" >> "$GITHUB_OUTPUT" echo "version: ${{ inputs.version }}" fi echo "buildnumber: ${{ inputs.buildnumber }}" @@ -132,6 +132,7 @@ jobs: uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild-fastlane.yml@v0.1 permissions: contents: read + security-events: write with: runsonlabels: '["macOS", "self-hosted"]' environment: ${{ needs.determineenvironment.outputs.environment }} diff --git a/.github/workflows/monthly-markdown-link-check.yml.yml b/.github/workflows/monthly-markdown-link-check.yml similarity index 100% rename from .github/workflows/monthly-markdown-link-check.yml.yml rename to .github/workflows/monthly-markdown-link-check.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 49ed3df9..a7b4d346 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,8 @@ jobs: formatreleasenotes: name: Format Release Notes uses: SchmiedmayerLab/.github/.github/workflows/format-release-notes.yml@v0.1 + permissions: + contents: read with: release-tag: ${{ github.event.release.tag_name }} repository: ${{ github.repository }} From 146b1f15e87a75df6ac1a32075bb9346c5651709 Mon Sep 17 00:00:00 2001 From: Paul Schmiedmayer Date: Sun, 14 Jun 2026 22:51:32 -0700 Subject: [PATCH 04/13] Update GitHub Actions --- .github/workflows/build-and-test.yml | 20 ++++++-------- .github/workflows/deployment.yml | 26 ++++++++++++++----- .../workflows/monthly-markdown-link-check.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/static-analysis.yml | 13 +++++----- fastlane/Fastfile | 15 ----------- 6 files changed, 36 insertions(+), 42 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 653c4c72..40958d93 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -20,10 +20,9 @@ concurrency: jobs: mhc_app_unit_tests: name: App Unit Tests - uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild-fastlane.yml@v0.1 + uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild.yml@testPR permissions: contents: read - security-events: write with: runsonlabels: '["macOS", "self-hosted"]' scheme: MyHeartCounts @@ -32,24 +31,21 @@ jobs: artifactname: MHC-App-UnitTests.xcresult mhc_app_ui_tests: name: App UI Tests - uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild-fastlane.yml@v0.1 + uses: SchmiedmayerLab/.github/.github/workflows/firebase-emulators-exec.yml@testPR permissions: contents: read - security-events: write with: - runsonlabels: '["macOS", "self-hosted"]' - artifactname: MHC-App-UITests.xcresult - setupfirebaseemulator: true + runs_on_labels: '["macOS", "self-hosted"]' + path: MyHeartCounts-Firebase checkout_submodules: true - customcommand: "cd ./MyHeartCounts-Firebase && npm install && npm run prepare && firebase emulators:exec 'cd .. && fastlane uitest'" + command: npm run prepare && 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: SchmiedmayerLab/.github/.github/workflows/xcodebuild-fastlane.yml@v0.1 + uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild.yml@testPR permissions: contents: read - security-events: write strategy: matrix: config: [Debug, Release] @@ -67,7 +63,7 @@ jobs: 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: SchmiedmayerLab/.github/.github/workflows/swift-test.yml@v0.1 + uses: SchmiedmayerLab/.github/.github/workflows/swift-test.yml@testPR permissions: contents: read strategy: @@ -80,7 +76,7 @@ jobs: uploadcoveragereport: name: Upload Coverage Report needs: [mhc_app_unit_tests, mhc_app_ui_tests, mhc_utils_unit_tests, mhc_utils_unit_tests_linux] - uses: SchmiedmayerLab/.github/.github/workflows/coverage.yml@v0.1 + uses: SchmiedmayerLab/.github/.github/workflows/coverage.yml@testPR permissions: actions: read contents: read diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index c47a49fd..2eb86470 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -129,14 +129,26 @@ jobs: testflight: name: iOS App TestFlight Deployment needs: [determineenvironment, vars] #, test] - uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild-fastlane.yml@v0.1 + uses: SchmiedmayerLab/.github/.github/workflows/xcode-deploy.yml@testPR permissions: contents: read - security-events: write with: - runsonlabels: '["macOS", "self-hosted"]' + runs_on_labels: '["macOS", "self-hosted"]' environment: ${{ needs.determineenvironment.outputs.environment }} - googleserviceinfoplistpath: 'MyHeartCounts/Supporting Files/GoogleService-Info.plist' - setupsigning: true - fastlanelane: deploy environment:"${{ needs.determineenvironment.outputs.environment }}" versionname:"${{ needs.vars.outputs.version }}" releasenotes:"${{ inputs.releasenotes }}" ${{ inputs.buildnumber && format('buildnumber:"{0}"', inputs.buildnumber) || '' }} strip_sensorkit_entitlement:false - secrets: inherit + injected_secret_file_path: 'MyHeartCounts/Supporting Files/GoogleService-Info.plist' + setup_signing: true + command: >- + fastlane deploy environment:"${{ needs.determineenvironment.outputs.environment }}" + versionname:"${{ needs.vars.outputs.version }}" releasenotes:"${{ inputs.releasenotes }}" + ${{ inputs.buildnumber && format('buildnumber:"{0}"', inputs.buildnumber) || '' }} + strip_sensorkit_entitlement:false + secrets: + APP_STORE_CONNECT_API_KEY_BASE64: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }} + APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }} + APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} + APPLE_ID: ${{ secrets.APPLE_ID }} + BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} + BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }} + BUILD_SECONDARY_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_SECONDARY_PROVISION_PROFILE_BASE64 }} + INJECTED_SECRET_FILE_BASE64: ${{ secrets.GOOGLE_SERVICE_INFO_PLIST_BASE64 }} + P12_PASSWORD: ${{ secrets.P12_PASSWORD }} diff --git a/.github/workflows/monthly-markdown-link-check.yml b/.github/workflows/monthly-markdown-link-check.yml index 436247f7..f4f5a72e 100644 --- a/.github/workflows/monthly-markdown-link-check.yml +++ b/.github/workflows/monthly-markdown-link-check.yml @@ -16,6 +16,6 @@ on: jobs: markdown_link_check: name: Markdown Link Check - uses: SchmiedmayerLab/.github/.github/workflows/markdown-links.yml@v0.1 + uses: SchmiedmayerLab/.github/.github/workflows/markdown-links.yml@testPR permissions: contents: read diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a7b4d346..66de3606 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ concurrency: jobs: formatreleasenotes: name: Format Release Notes - uses: SchmiedmayerLab/.github/.github/workflows/format-release-notes.yml@v0.1 + uses: SchmiedmayerLab/.github/.github/workflows/format-release-notes.yml@testPR permissions: contents: read with: diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 9cc0a7ca..db74e412 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -20,17 +20,17 @@ concurrency: jobs: reuse_action: name: REUSE Compliance Check - uses: SchmiedmayerLab/.github/.github/workflows/reuse.yml@v0.1 + uses: SchmiedmayerLab/.github/.github/workflows/reuse.yml@testPR permissions: contents: read swiftlint: name: SwiftLint - uses: SchmiedmayerLab/.github/.github/workflows/swiftlint.yml@v0.1 + uses: SchmiedmayerLab/.github/.github/workflows/swiftlint.yml@testPR permissions: contents: read periphery: name: Periphery - uses: SchmiedmayerLab/.github/.github/workflows/periphery.yml@v0.1 + uses: SchmiedmayerLab/.github/.github/workflows/periphery.yml@testPR permissions: contents: read with: @@ -38,17 +38,18 @@ jobs: strict: false markdownlinkcheck: name: Markdown Link Check - uses: SchmiedmayerLab/.github/.github/workflows/markdown-links.yml@v0.1 + uses: SchmiedmayerLab/.github/.github/workflows/markdown-links.yml@testPR permissions: contents: read codeql: name: CodeQL - uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild-fastlane.yml@v0.1 + uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild.yml@testPR permissions: security-events: write actions: read contents: read with: codeql: true - fastlanelane: codeql + scheme: MyHeartCounts + test: false xcodeversion: 26.4 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index e1f7c08c..1c644900 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -87,21 +87,6 @@ platform :ios do end end - desc "CodeQL" - lane :codeql do - ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "320" # CodeQL runs on GitHub CI. We need much higher timeout here. - build_app( - scheme: APP_CONFIG[:scheme], - skip_archive: true, - skip_codesigning: true, - derived_data_path: ".derivedData", - xcargs: [ - "-skipPackagePluginValidation", - "-skipMacroValidation" - ] - ) - end - desc "Build app" lane :build do build_app( From 1c34beabf5196430b8dccb1eb388d402aa3f185e Mon Sep 17 00:00:00 2001 From: Paul Schmiedmayer Date: Sun, 14 Jun 2026 23:41:40 -0700 Subject: [PATCH 05/13] Update Setup --- .github/workflows/build-and-test.yml | 10 ++++----- .github/workflows/deployment.yml | 22 +++++++++---------- .../workflows/monthly-markdown-link-check.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/static-analysis.yml | 10 ++++----- MyHeartCounts.xcodeproj/project.pbxproj | 8 +++---- .../Prompted Actions/PromptedAction.swift | 2 +- MyHeartCounts/Modules/StudyBundleLoader.swift | 4 ++-- README.md | 4 ++-- fastlane/Fastfile | 4 ++-- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 40958d93..cb3139a2 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -20,7 +20,7 @@ concurrency: jobs: mhc_app_unit_tests: name: App Unit Tests - uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild.yml@testPR + uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild.yml@v0.2 permissions: contents: read with: @@ -31,7 +31,7 @@ jobs: artifactname: MHC-App-UnitTests.xcresult mhc_app_ui_tests: name: App UI Tests - uses: SchmiedmayerLab/.github/.github/workflows/firebase-emulators-exec.yml@testPR + uses: SchmiedmayerLab/.github/.github/workflows/firebase-emulators-exec.yml@v0.2 permissions: contents: read with: @@ -43,7 +43,7 @@ jobs: GOOGLE_APPLICATION_CREDENTIALS_BASE64: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_BASE64 }} mhc_utils_unit_tests: name: Utils Unit Tests (${{ matrix.platform.name }} ${{ matrix.config }}) - uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild.yml@testPR + uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild.yml@v0.2 permissions: contents: read strategy: @@ -63,7 +63,7 @@ jobs: 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: SchmiedmayerLab/.github/.github/workflows/swift-test.yml@testPR + uses: SchmiedmayerLab/.github/.github/workflows/swift-test.yml@v0.2 permissions: contents: read strategy: @@ -76,7 +76,7 @@ jobs: uploadcoveragereport: name: Upload Coverage Report needs: [mhc_app_unit_tests, mhc_app_ui_tests, mhc_utils_unit_tests, mhc_utils_unit_tests_linux] - uses: SchmiedmayerLab/.github/.github/workflows/coverage.yml@testPR + uses: SchmiedmayerLab/.github/.github/workflows/coverage.yml@v0.2 permissions: actions: read contents: read diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 2eb86470..efcfd074 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -77,7 +77,7 @@ jobs: environment: ${{ steps.determineenvironment.outputs.environment }} steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Determine Environment id: determineenvironment run: | @@ -96,7 +96,7 @@ jobs: version: ${{ steps.script.outputs.version }} steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: actions-ecosystem/action-get-latest-tag@v1 id: get-latest-tag with: @@ -119,17 +119,17 @@ jobs: fi echo "buildnumber: ${{ inputs.buildnumber }}" echo "releasenotes: ${{ inputs.releasenotes }}" - # test: - # name: Build and Test - # needs: determineenvironment - # uses: ./.github/workflows/build-and-test.yml - # permissions: - # contents: read - # secrets: inherit + test: + name: Build and Test + needs: determineenvironment + uses: ./.github/workflows/build-and-test.yml + permissions: + contents: read + secrets: inherit testflight: name: iOS App TestFlight Deployment - needs: [determineenvironment, vars] #, test] - uses: SchmiedmayerLab/.github/.github/workflows/xcode-deploy.yml@testPR + needs: [determineenvironment, vars, test] + uses: SchmiedmayerLab/.github/.github/workflows/xcode-deploy.yml@v0.2 permissions: contents: read with: diff --git a/.github/workflows/monthly-markdown-link-check.yml b/.github/workflows/monthly-markdown-link-check.yml index f4f5a72e..d6563f27 100644 --- a/.github/workflows/monthly-markdown-link-check.yml +++ b/.github/workflows/monthly-markdown-link-check.yml @@ -16,6 +16,6 @@ on: jobs: markdown_link_check: name: Markdown Link Check - uses: SchmiedmayerLab/.github/.github/workflows/markdown-links.yml@testPR + uses: SchmiedmayerLab/.github/.github/workflows/markdown-links.yml@v0.2 permissions: contents: read diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 66de3606..b73ea851 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ concurrency: jobs: formatreleasenotes: name: Format Release Notes - uses: SchmiedmayerLab/.github/.github/workflows/format-release-notes.yml@testPR + uses: SchmiedmayerLab/.github/.github/workflows/format-release-notes.yml@v0.2 permissions: contents: read with: diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index db74e412..3ee1311c 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -20,17 +20,17 @@ concurrency: jobs: reuse_action: name: REUSE Compliance Check - uses: SchmiedmayerLab/.github/.github/workflows/reuse.yml@testPR + uses: SchmiedmayerLab/.github/.github/workflows/reuse.yml@v0.2 permissions: contents: read swiftlint: name: SwiftLint - uses: SchmiedmayerLab/.github/.github/workflows/swiftlint.yml@testPR + uses: SchmiedmayerLab/.github/.github/workflows/swiftlint.yml@v0.2 permissions: contents: read periphery: name: Periphery - uses: SchmiedmayerLab/.github/.github/workflows/periphery.yml@testPR + uses: SchmiedmayerLab/.github/.github/workflows/periphery.yml@v0.2 permissions: contents: read with: @@ -38,12 +38,12 @@ jobs: strict: false markdownlinkcheck: name: Markdown Link Check - uses: SchmiedmayerLab/.github/.github/workflows/markdown-links.yml@testPR + uses: SchmiedmayerLab/.github/.github/workflows/markdown-links.yml@v0.2 permissions: contents: read codeql: name: CodeQL - uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild.yml@testPR + uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild.yml@v0.2 permissions: security-events: write actions: read diff --git a/MyHeartCounts.xcodeproj/project.pbxproj b/MyHeartCounts.xcodeproj/project.pbxproj index 13642cda..8d0e182a 100644 --- a/MyHeartCounts.xcodeproj/project.pbxproj +++ b/MyHeartCounts.xcodeproj/project.pbxproj @@ -1035,8 +1035,8 @@ OTHER_SWIFT_FLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = edu.stanford.MyHeartCounts; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "My Heart Counts - Biodesign Digital Health"; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "My Heart Counts - Biodesign Digital Health"; + PROVISIONING_PROFILE_SPECIFIER = "My Heart Counts"; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "My Heart Counts"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; @@ -1179,8 +1179,8 @@ MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = edu.stanford.MyHeartCounts.watchkitapp; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "My Heart Counts - Biodesign Digital Health - Watch"; - "PROVISIONING_PROFILE_SPECIFIER[sdk=watchos*]" = "My Heart Counts - Biodesign Digital Health - Watch"; + PROVISIONING_PROFILE_SPECIFIER = "My Heart Counts - Watch"; + "PROVISIONING_PROFILE_SPECIFIER[sdk=watchos*]" = "My Heart Counts - Watch"; SDKROOT = watchos; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; diff --git a/MyHeartCounts/Home Tab/Prompted Actions/PromptedAction.swift b/MyHeartCounts/Home Tab/Prompted Actions/PromptedAction.swift index 49100d01..488be399 100644 --- a/MyHeartCounts/Home Tab/Prompted Actions/PromptedAction.swift +++ b/MyHeartCounts/Home Tab/Prompted Actions/PromptedAction.swift @@ -73,7 +73,7 @@ extension HomeTab { lastResult = await Result { try await handler(spezi) } - return try lastResult!.get() // swiftlint:disable:this force_unwrapping return_value_from_void_function + try lastResult!.get() // swiftlint:disable:this force_unwrapping } } } diff --git a/MyHeartCounts/Modules/StudyBundleLoader.swift b/MyHeartCounts/Modules/StudyBundleLoader.swift index 121203cb..ba18a596 100644 --- a/MyHeartCounts/Modules/StudyBundleLoader.swift +++ b/MyHeartCounts/Modules/StudyBundleLoader.swift @@ -88,14 +88,14 @@ final class StudyBundleLoader: Module, Sendable { case (.none, _), (.some(.failure), _): value = newValue return .changed(newValue) - case (.some(.success(let oldBundle)), .success(let newBundle)): + case let (.some(.success(oldBundle)), .success(newBundle)): if newBundle != oldBundle { value = .success(newBundle) return .changed(.success(newBundle)) } else { return .unchanged(.success(oldBundle)) } - case (.some(.success(let oldBundle)), .failure): + case let (.some(.success(oldBundle)), .failure): if preferCachedBundleOnError { // in this case (we successfully obtained a study bundle before, but it now has failed), // we keep the old bundle around instead of updating `_studyBundle` with the error case. diff --git a/README.md b/README.md index 6170c085..7cc8d037 100644 --- a/README.md +++ b/README.md @@ -126,5 +126,5 @@ Contributions to this project are welcome. Please make sure to read the [contrib This project is licensed under the MIT License. See [Licenses](https://github.com/SchmiedmayerLab/MyHeartCounts-iOS/tree/main/LICENSES) for more information. -![Stanford Biodesign Footer](https://raw.githubusercontent.com/SchmiedmayerLab/.github/main/assets/biodesign-footer-light.png#gh-light-mode-only) -![Stanford Biodesign Footer](https://raw.githubusercontent.com/SchmiedmayerLab/.github/main/assets/biodesign-footer-dark.png#gh-dark-mode-only) +![Stanford and Stanford Medicine logos](https://raw.githubusercontent.com/SchmiedmayerLab/.github/main/assets/stanford-footer-light.png#gh-light-mode-only) +![Stanford and Stanford Medicine logos](https://raw.githubusercontent.com/SchmiedmayerLab/.github/main/assets/stanford-footer-dark.png#gh-dark-mode-only) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 1c644900..0fb4d44c 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -12,8 +12,8 @@ APP_CONFIG = { default_environment: "staging", default_app_identifier: "edu.stanford.MyHeartCounts", default_secondary_app_identifier: "edu.stanford.MyHeartCounts.watchkitapp", - default_provisioningProfile: "My Heart Counts - Biodesign Digital Health", - default_secondary_provisioningProfile: "My Heart Counts - Biodesign Digital Health - Watch", + default_provisioningProfile: "My Heart Counts", + default_secondary_provisioningProfile: "My Heart Counts - Watch", default_version_name: "4.0.0", default_release_notes: "Bug fixes and performance improvements.", scheme: "MyHeartCounts", From bb79d36b89fddfd122a61ee485713b3fd94c4166 Mon Sep 17 00:00:00 2001 From: Lukas Kollmer Date: Mon, 15 Jun 2026 10:29:43 +0200 Subject: [PATCH 06/13] try to fix build --- MyHeartCountsShared/Package.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MyHeartCountsShared/Package.swift b/MyHeartCountsShared/Package.swift index d521dd21..0eff3f71 100644 --- a/MyHeartCountsShared/Package.swift +++ b/MyHeartCountsShared/Package.swift @@ -23,7 +23,8 @@ packageDeps += [ .package(url: "https://github.com/SFSafeSymbols/SFSafeSymbols.git", from: "7.0.0"), // not actually used but we need to force the version until we update SpeziStudy .package(url: "https://github.com/StanfordSpezi/SpeziStorage.git", from: "2.1.4"), - .package(url: "https://github.com/StanfordSpezi/SpeziScheduler.git", from: "1.2.20") + .package(url: "https://github.com/StanfordSpezi/SpeziScheduler.git", from: "1.2.20"), + .package(url: "https://github.com/apple/FHIRModels.git", .upToNextMinor(from: "0.8.0")) ] #endif From e7c886c7b65624d08083bb64ef980b20d5b25bfb Mon Sep 17 00:00:00 2001 From: Lukas Kollmer Date: Mon, 15 Jun 2026 11:21:48 +0200 Subject: [PATCH 07/13] hmmm --- .github/workflows/build-and-test.yml | 3 ++- .../xcshareddata/xcschemes/MyHeartCounts.xcscheme | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index cb3139a2..331fe23f 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -31,13 +31,14 @@ jobs: artifactname: MHC-App-UnitTests.xcresult mhc_app_ui_tests: name: App UI Tests - uses: SchmiedmayerLab/.github/.github/workflows/firebase-emulators-exec.yml@v0.2 + uses: SchmiedmayerLab/.github/.github/workflows/firebase-emulators-exec.yml@lukas/fix-artifacts permissions: contents: read with: runs_on_labels: '["macOS", "self-hosted"]' path: MyHeartCounts-Firebase checkout_submodules: true + artifactname: MHC-App-UITests.xcresult command: npm run prepare && cd .. && fastlane uitest secrets: GOOGLE_APPLICATION_CREDENTIALS_BASE64: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_BASE64 }} diff --git a/MyHeartCounts.xcodeproj/xcshareddata/xcschemes/MyHeartCounts.xcscheme b/MyHeartCounts.xcodeproj/xcshareddata/xcschemes/MyHeartCounts.xcscheme index 1a15726f..fc6ef5e2 100644 --- a/MyHeartCounts.xcodeproj/xcshareddata/xcschemes/MyHeartCounts.xcscheme +++ b/MyHeartCounts.xcodeproj/xcshareddata/xcschemes/MyHeartCounts.xcscheme @@ -29,11 +29,11 @@ shouldUseLaunchSchemeArgsEnv = "YES"> + reference = "container:MyHeartCountsTests/MyHeartCounts Unit Tests.xctestplan"> + reference = "container:MyHeartCountsUITests/MyHeartCounts UI Tests.xctestplan" + default = "YES"> From 611b4a2a536a7b1dda1550cb6b635779b607d966 Mon Sep 17 00:00:00 2001 From: Lukas Kollmer Date: Tue, 16 Jun 2026 11:28:47 +0200 Subject: [PATCH 08/13] x --- .github/workflows/build-and-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 331fe23f..675d1ff0 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -38,7 +38,7 @@ jobs: runs_on_labels: '["macOS", "self-hosted"]' path: MyHeartCounts-Firebase checkout_submodules: true - artifactname: MHC-App-UITests.xcresult + artifact: MHC-App-UITests.xcresult command: npm run prepare && cd .. && fastlane uitest secrets: GOOGLE_APPLICATION_CREDENTIALS_BASE64: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_BASE64 }} @@ -55,6 +55,7 @@ jobs: destination: 'platform=iOS Simulator,name=iPhone 17 Pro' - name: macOS destination: 'platform=macOS,arch=arm64' + fail-fast: false with: runsonlabels: '["macOS", "self-hosted"]' path: MyHeartCountsShared From d72729adb72875e92e563b0827000176dc4e30b4 Mon Sep 17 00:00:00 2001 From: Lukas Kollmer Date: Tue, 16 Jun 2026 12:11:15 +0200 Subject: [PATCH 09/13] urgh --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 675d1ff0..fef6ef03 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -38,7 +38,7 @@ jobs: runs_on_labels: '["macOS", "self-hosted"]' path: MyHeartCounts-Firebase checkout_submodules: true - artifact: MHC-App-UITests.xcresult + artifact: ../MHC-App-UITests.xcresult command: npm run prepare && cd .. && fastlane uitest secrets: GOOGLE_APPLICATION_CREDENTIALS_BASE64: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_BASE64 }} From 4ca320cb35a2542272f14ed3b67b3d94ed238c87 Mon Sep 17 00:00:00 2001 From: Lukas Kollmer Date: Tue, 16 Jun 2026 13:29:38 +0200 Subject: [PATCH 10/13] hmmm --- .github/workflows/build-and-test.yml | 32 +++++++++++++------ .github/workflows/deployment.yml | 2 +- .../workflows/monthly-markdown-link-check.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/static-analysis.yml | 10 +++--- 5 files changed, 31 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index fef6ef03..017f1789 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -20,7 +20,7 @@ concurrency: jobs: mhc_app_unit_tests: name: App Unit Tests - uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild.yml@v0.2 + uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild.yml@lukas/fix-artifacts permissions: contents: read with: @@ -31,20 +31,34 @@ jobs: artifactname: MHC-App-UnitTests.xcresult mhc_app_ui_tests: name: App UI Tests - uses: SchmiedmayerLab/.github/.github/workflows/firebase-emulators-exec.yml@lukas/fix-artifacts + uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild-or-fastlane.yml@lukas/fix-artifacts permissions: contents: read with: - runs_on_labels: '["macOS", "self-hosted"]' - path: MyHeartCounts-Firebase + runsonlabels: '["macOS", "self-hosted"]' + artifactname: MHC-App-UITests.xcresult + setupfirebaseemulator: true checkout_submodules: true - artifact: ../MHC-App-UITests.xcresult - command: npm run prepare && cd .. && fastlane uitest + 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_app_ui_tests: + # name: App UI Tests + # uses: SchmiedmayerLab/.github/.github/workflows/firebase-emulators-exec.yml@lukas/fix-artifacts + # permissions: + # contents: read + # with: + # runs_on_labels: '["macOS", "self-hosted"]' + # path: MyHeartCounts-Firebase + # checkout_submodules: true + # artifact: ../MHC-App-UITests.xcresult + # command: npm run prepare && 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: SchmiedmayerLab/.github/.github/workflows/xcodebuild.yml@v0.2 + uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild.yml@lukas/fix-artifacts permissions: contents: read strategy: @@ -65,7 +79,7 @@ jobs: 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: SchmiedmayerLab/.github/.github/workflows/swift-test.yml@v0.2 + uses: SchmiedmayerLab/.github/.github/workflows/swift-test.yml@lukas/fix-artifacts permissions: contents: read strategy: @@ -78,7 +92,7 @@ jobs: uploadcoveragereport: name: Upload Coverage Report needs: [mhc_app_unit_tests, mhc_app_ui_tests, mhc_utils_unit_tests, mhc_utils_unit_tests_linux] - uses: SchmiedmayerLab/.github/.github/workflows/coverage.yml@v0.2 + uses: SchmiedmayerLab/.github/.github/workflows/coverage.yml@lukas/fix-artifacts permissions: actions: read contents: read diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index efcfd074..f9149c5c 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -129,7 +129,7 @@ jobs: testflight: name: iOS App TestFlight Deployment needs: [determineenvironment, vars, test] - uses: SchmiedmayerLab/.github/.github/workflows/xcode-deploy.yml@v0.2 + uses: SchmiedmayerLab/.github/.github/workflows/xcode-deploy.yml@lukas/fix-artifacts permissions: contents: read with: diff --git a/.github/workflows/monthly-markdown-link-check.yml b/.github/workflows/monthly-markdown-link-check.yml index d6563f27..5f802cfb 100644 --- a/.github/workflows/monthly-markdown-link-check.yml +++ b/.github/workflows/monthly-markdown-link-check.yml @@ -16,6 +16,6 @@ on: jobs: markdown_link_check: name: Markdown Link Check - uses: SchmiedmayerLab/.github/.github/workflows/markdown-links.yml@v0.2 + uses: SchmiedmayerLab/.github/.github/workflows/markdown-links.yml@lukas/fix-artifacts permissions: contents: read diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b73ea851..181569e2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ concurrency: jobs: formatreleasenotes: name: Format Release Notes - uses: SchmiedmayerLab/.github/.github/workflows/format-release-notes.yml@v0.2 + uses: SchmiedmayerLab/.github/.github/workflows/format-release-notes.yml@lukas/fix-artifacts permissions: contents: read with: diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 3ee1311c..3c6c25d1 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -20,17 +20,17 @@ concurrency: jobs: reuse_action: name: REUSE Compliance Check - uses: SchmiedmayerLab/.github/.github/workflows/reuse.yml@v0.2 + uses: SchmiedmayerLab/.github/.github/workflows/reuse.yml@lukas/fix-artifacts permissions: contents: read swiftlint: name: SwiftLint - uses: SchmiedmayerLab/.github/.github/workflows/swiftlint.yml@v0.2 + uses: SchmiedmayerLab/.github/.github/workflows/swiftlint.yml@lukas/fix-artifacts permissions: contents: read periphery: name: Periphery - uses: SchmiedmayerLab/.github/.github/workflows/periphery.yml@v0.2 + uses: SchmiedmayerLab/.github/.github/workflows/periphery.yml@lukas/fix-artifacts permissions: contents: read with: @@ -38,12 +38,12 @@ jobs: strict: false markdownlinkcheck: name: Markdown Link Check - uses: SchmiedmayerLab/.github/.github/workflows/markdown-links.yml@v0.2 + uses: SchmiedmayerLab/.github/.github/workflows/markdown-links.yml@lukas/fix-artifacts permissions: contents: read codeql: name: CodeQL - uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild.yml@v0.2 + uses: SchmiedmayerLab/.github/.github/workflows/xcodebuild.yml@lukas/fix-artifacts permissions: security-events: write actions: read From a7b9098dc55e7c1dcdbc762a36ea815278d9be22 Mon Sep 17 00:00:00 2001 From: Lukas Kollmer Date: Tue, 16 Jun 2026 14:20:02 +0200 Subject: [PATCH 11/13] hmmm --- MyHeartCountsUITests/AOnboardingTests.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MyHeartCountsUITests/AOnboardingTests.swift b/MyHeartCountsUITests/AOnboardingTests.swift index da816669..c484346b 100644 --- a/MyHeartCountsUITests/AOnboardingTests.swift +++ b/MyHeartCountsUITests/AOnboardingTests.swift @@ -339,9 +339,11 @@ struct OnboardingNavigator { // swiftlint:disable:this type_body_length private func navigateHealthRecords() { - XCTAssert(app.staticTexts["Health Records"].waitForExistence(timeout: 2)) + let title = app.staticTexts["Health Records"] + XCTAssert(title.waitForExistence(timeout: 2)) app.buttons["Review Permissions"].tap() testCase.handleHealthRecordsAuthorization() + XCTAssert(title.waitForNonExistence(timeout: 10)) // give it some time to complete the auth } From 7ee3fced84dc6ba1d67b3ae5f039fdd83a48d127 Mon Sep 17 00:00:00 2001 From: Lukas Kollmer Date: Tue, 16 Jun 2026 17:03:00 +0200 Subject: [PATCH 12/13] test smth --- MyHeartCounts/Modules/ClinicalRecordPermissions.swift | 2 +- MyHeartCounts/SharedContext/FeatureFlags.swift | 11 +++++++---- .../MyHeartCountsShared/Launch Options/Other.swift | 4 ++++ MyHeartCountsUITests/MHCTestCase.swift | 2 ++ 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/MyHeartCounts/Modules/ClinicalRecordPermissions.swift b/MyHeartCounts/Modules/ClinicalRecordPermissions.swift index fa399d1f..dd383c6b 100644 --- a/MyHeartCounts/Modules/ClinicalRecordPermissions.swift +++ b/MyHeartCounts/Modules/ClinicalRecordPermissions.swift @@ -26,7 +26,7 @@ final class ClinicalRecordPermissions: Module, EnvironmentAccessible, Sendable { } /// Whether clinical records are available. - static var isAvailable: Bool = !FeatureFlags.disableHealthRecords && HKHealthStore().supportsHealthRecords() + static let isAvailable: Bool = !FeatureFlags.disableHealthRecords && HKHealthStore().supportsHealthRecords() // swiftlint:disable attributes @ObservationIgnored @Dependency(HealthKit.self) private var healthKit diff --git a/MyHeartCounts/SharedContext/FeatureFlags.swift b/MyHeartCounts/SharedContext/FeatureFlags.swift index 48872011..1f78cc5e 100644 --- a/MyHeartCounts/SharedContext/FeatureFlags.swift +++ b/MyHeartCounts/SharedContext/FeatureFlags.swift @@ -40,9 +40,14 @@ enum FeatureFlags { LaunchOptions.launchOptions[.overrideFirebaseConfig] } - /// Whether Health-Record-related functionality should be disabled. + /// Whether Health-Record-related functionality should be enabled. + static var enableHealthRecords: Bool { + LaunchOptions.launchOptions[.enableHealthRecords] + } + + @available(*, deprecated, renamed: "enableHealthRecords") static var disableHealthRecords: Bool { - LaunchOptions.launchOptions[.disableHealthRecords] + !enableHealthRecords } } @@ -55,6 +60,4 @@ extension LaunchOptions { static let disableAutomaticBulkHealthExport = LaunchOption("--disableAutomaticBulkHealthExport", default: false) static let disableSensorKitUpload = LaunchOption("--disableSensorKitUpload", default: false) - - static let disableHealthRecords = LaunchOption("--disableHealthRecords", default: false) } diff --git a/MyHeartCountsShared/Sources/MyHeartCountsShared/Launch Options/Other.swift b/MyHeartCountsShared/Sources/MyHeartCountsShared/Launch Options/Other.swift index 07d3f712..9f5e2f12 100644 --- a/MyHeartCountsShared/Sources/MyHeartCountsShared/Launch Options/Other.swift +++ b/MyHeartCountsShared/Sources/MyHeartCountsShared/Launch Options/Other.swift @@ -13,6 +13,10 @@ extension LaunchOptions { /// /// - Note: Specifying `false` for this option when the account key is `true` will not force-disable the debug mode. public static let forceEnableDebugMode = LaunchOption("--forceEnableDebugMode", default: false) + + + /// Whether the app should enable its HealthKit Clinical Records integration + public static let enableHealthRecords = LaunchOption("--enableHealthRecords", default: true) } #endif diff --git a/MyHeartCountsUITests/MHCTestCase.swift b/MyHeartCountsUITests/MHCTestCase.swift index b28991e7..790ab31c 100644 --- a/MyHeartCountsUITests/MHCTestCase.swift +++ b/MyHeartCountsUITests/MHCTestCase.swift @@ -72,6 +72,7 @@ class MHCTestCase: XCTestCase, @unchecked Sendable { locale: Locale = .current, enableDebugMode: Bool = false, testEnvironmentConfig: SetupTestEnvironmentConfig = .init(resetExistingData: true, loginAndEnroll: true), + enableHealthRecords: Bool = false, // temporarily disabled skipHealthPermissionsHandling: Bool = false, skipGoingToHomeTab: Bool = false, heightEntryUnitOverride: LaunchOptions.HeightInputUnitOverride = .none, @@ -88,6 +89,7 @@ class MHCTestCase: XCTestCase, @unchecked Sendable { StudyBundleSelector.atUrl(studyBundleUrl).launchOptionArgs(for: .studyBundleSelector) "--disableAutomaticBulkHealthExport" enableDebugMode.launchOptionArgs(for: .forceEnableDebugMode) + enableHealthRecords.launchOptionArgs(for: .enableHealthRecords) heightEntryUnitOverride.launchOptionArgs(for: .heightInputUnitOverride) weightEntryUnitOverride.launchOptionArgs(for: .weightInputUnitOverride) } From 5476247b5aadc5369a8c6496f9a77b9fd81d9851 Mon Sep 17 00:00:00 2001 From: Lukas Kollmer Date: Tue, 16 Jun 2026 17:47:56 +0200 Subject: [PATCH 13/13] ooof --- .../MyHeartCountsShared/Launch Options/LaunchOptions.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MyHeartCountsShared/Sources/MyHeartCountsShared/Launch Options/LaunchOptions.swift b/MyHeartCountsShared/Sources/MyHeartCountsShared/Launch Options/LaunchOptions.swift index 91eddcdf..a8b8fe16 100644 --- a/MyHeartCountsShared/Sources/MyHeartCountsShared/Launch Options/LaunchOptions.swift +++ b/MyHeartCountsShared/Sources/MyHeartCountsShared/Launch Options/LaunchOptions.swift @@ -299,7 +299,11 @@ extension Bool: LaunchOptionDecodable, LaunchOptionEncodable { } public func launchOptionArgs(for launchOption: LaunchOption) -> [String] { - self ? [launchOption.key] : [] + if self { + [launchOption.key, "true"] + } else { + [launchOption.key, "false"] + } } }