stages:
- test

before_script:
 - echo $CI_BUILD_REF
 - echo $CI_PROJECT_DIR
 - echo $PWD
 - swift --version
 - xcodebuild -version
 - eval $(ssh-agent -s)
 - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
 - mkdir -p ~/.ssh
 - chmod 700 ~/.ssh
 - ssh-keyscan -t rsa $GITLAB_SERVER > ~/.ssh/known_hosts

unit-testing:
 stage: test
 tags:
  - ios
 script:
  - set -o pipefail && xcodebuild -workspace 'client-ios.xcworkspace' -scheme 'Mock' -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=16.0,name=iPhone 14' test
 retry: 1
