Feature/octreotide algorithm #2
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
| name: Octreotide CI | ||
|
Check failure on line 1 in .github/workflows/octreotide-ci.yml
|
||
| on: | ||
| push: | ||
| branches: [ feature/octreotide-algorithm ] | ||
| paths: | ||
| - 'Experimental/Octreotide/**' | ||
| pull_request: | ||
| branches: [ main ] | ||
| paths: | ||
| - 'Experimental/Octreotide/**' | ||
| workflow_dispatch: # Allow manual triggers | ||
| jobs: | ||
| test: | ||
| name: Run Tests | ||
| runs-on: macos-latest | ||
| strategy: | ||
| matrix: | ||
| xcode: ['14.3.1'] # Add more versions if needed | ||
| device: ['iPhone 14', 'iPhone 14 Pro', 'iPad Pro (12.9-inch) (6th generation)'] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| - name: Select Xcode ${{ matrix.xcode }} | ||
| run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app | ||
| - name: Run Unit Tests | ||
| run: | | ||
| xcodebuild test \ | ||
| -workspace LoopWorkspace.xcworkspace \ | ||
| -scheme LoopWorkspace \ | ||
| -destination "platform=iOS Simulator,name=${{ matrix.device }},OS=latest" \ | ||
| -only-testing:OctreotideAlgorithmTests \ | ||
| -enableCodeCoverage YES \ | ||
| -resultBundlePath TestResults.xcresult | ||
| - name: Upload Test Results | ||
| if: always() | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: test-results-${{ matrix.device }} | ||
| path: TestResults.xcresult | ||
| - name: Generate Coverage Report | ||
| if: success() | ||
| run: | | ||
| xcrun xccov view --report TestResults.xcresult > coverage-${{ matrix.device }}.txt | ||
| - name: Upload Coverage | ||
| if: success() | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: code-coverage-${{ matrix.device }} | ||
| path: coverage-${{ matrix.device }}.txt | ||
| integration-tests: | ||
| name: Integration Tests | ||
| needs: unit-tests | ||
| runs-on: macos-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| - name: Select Xcode | ||
| run: sudo xcode-select -s /Applications/Xcode.app | ||
| - name: Run Simulation Tests | ||
| run: | | ||
| # Run simulator with different glucose patterns | ||
| xcodebuild test \ | ||
| -workspace LoopWorkspace.xcworkspace \ | ||
| -scheme LoopWorkspace \ | ||
| -destination 'platform=iOS Simulator,name=iPhone 14,OS=latest' \ | ||
| -only-testing:GlucoseSimulatorTests \ | ||
| -resultBundlePath SimResults.xcresult | ||
| - name: Upload Simulation Results | ||
| if: always() | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: simulation-results | ||
| path: SimResults.xcresult | ||
| build-only: | ||
| name: Build Without Signing | ||
| needs: [unit-tests, integration-tests] | ||
| runs-on: macos-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| - name: Select Xcode | ||
| run: sudo xcode-select -s /Applications/Xcode.app | ||
| - name: Build for Simulator | ||
| run: | | ||
| xcodebuild build \ | ||
| -workspace LoopWorkspace.xcworkspace \ | ||
| -scheme LoopWorkspace \ | ||
| -destination 'platform=iOS Simulator,name=iPhone 14,OS=latest' \ | ||
| -configuration Debug \ | ||
| CODE_SIGN_IDENTITY="" \ | ||
| CODE_SIGNING_REQUIRED=NO \ | ||
| CODE_SIGNING_ALLOWED=NO | ||
| - name: Archive Build Logs | ||
| if: always() | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: build-logs | ||
| path: ~/Library/Developer/Xcode/DerivedData/**/Logs/Build | ||