feat(GiniHealthSDK): UnitTests for GiniHealthSDK IPC-196 #214
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: Check Health API Library | |
on: | |
push: | |
paths: | |
- 'HealthAPILibrary/**' | |
tags-ignore: | |
- '**' | |
pull_request: | |
paths: | |
- 'HealthAPILibrary/**' | |
workflow_call: | |
secrets: | |
GINI_MOBILE_TEST_CLIENT_SECRET: | |
required: true | |
jobs: | |
check: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
target: [GiniHealthAPILibrary, GiniHealthAPILibraryPinning] | |
destination: ['platform=iOS Simulator,OS=16.2,name=iPhone 13', 'platform=iOS Simulator,OS=15.0,name=iPhone 11'] | |
steps: | |
- uses: maxim-lobanov/[email protected] | |
with: | |
xcode-version: '14.2' | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Check package GiniHealthAPILibrary | |
run: | | |
cd HealthAPILibrary/GiniHealthAPILibrary | |
swift package update | |
- name: Check package GiniHealthAPILibraryPinning | |
run: | | |
cd HealthAPILibrary/GiniHealthAPILibraryPinning | |
swift package update | |
- name: Link to 15.0 Simulators | |
if: matrix.destination == 'platform=iOS Simulator,OS=15.0,name=iPhone 11' | |
run: | | |
echo "Creating Runtimes folder if needed..." | |
sudo mkdir -p /Library/Developer/CoreSimulator/Profiles/Runtimes | |
echo "Creating symlink of the iOS 15.0 runtime..." | |
sudo ln -s /Applications/Xcode_13.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 15.0.simruntime | |
- name: Build sdk targets | |
run: | | |
xcodebuild -workspace GiniMobile.xcworkspace -scheme "${{ matrix.target }}" -destination "${{ matrix.destination }}" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | |
- name: Run unit tests | |
run: | | |
xcodebuild clean test -workspace GiniMobile.xcworkspace -scheme "${{ matrix.target }}Tests" -destination "${{ matrix.destination }}" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | |
- name: Build example app and run integration tests | |
run: > | |
xcodebuild clean test | |
-project HealthAPILibrary/GiniHealthAPILibraryExample/GiniHealthAPILibraryExample.xcodeproj | |
-scheme "GiniHealthAPILibraryExampleTests" | |
-destination "${{ matrix.destination }}" | |
CODE_SIGN_IDENTITY="" | |
CODE_SIGNING_REQUIRED=NO | |
ONLY_ACTIVE_ARCH=NO | |
CLIENT_ID="gini-mobile-test" | |
CLIENT_SECRET="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}" | |
- name: Build pinning example app and run integration tests | |
run: > | |
xcodebuild clean test | |
-project HealthAPILibrary/GiniHealthAPILibraryPinningExample/GiniHealthAPILibraryPinningExample.xcodeproj | |
-scheme "GiniHealthAPILibraryPinningExampleTests" | |
-destination "${{ matrix.destination }}" | |
-skip-testing:GiniHealthAPILibraryPinningExampleTests/HealthAPILibraryPinningWrongCertificatesTests | |
CODE_SIGN_IDENTITY="" | |
CODE_SIGNING_REQUIRED=NO | |
ONLY_ACTIVE_ARCH=NO | |
CLIENT_ID="gini-mobile-test" | |
CLIENT_SECRET="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}" | |
&& | |
xcodebuild clean test | |
-project HealthAPILibrary/GiniHealthAPILibraryPinningExample/GiniHealthAPILibraryPinningExample.xcodeproj | |
-scheme "GiniHealthAPILibraryPinningExampleTests" | |
-destination "${{ matrix.destination }}" | |
-only-testing:GiniHealthAPILibraryPinningExampleTests/HealthAPILibraryPinningWrongCertificatesTests | |
CODE_SIGN_IDENTITY="" | |
CODE_SIGNING_REQUIRED=NO | |
ONLY_ACTIVE_ARCH=NO | |
CLIENT_ID="gini-mobile-test" | |
CLIENT_SECRET="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}" |