Skip to content
Snippets Groups Projects
Commit 6859ec34 authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Merge branch 'feature/run-tests-on-ci' into 'development'

Run tests on CI

See merge request elixxir/client-ios-db!34
parents f1578c6b 62371378
Branches
Tags
2 merge requests!34Run tests on CI,!30Release v1.2.0
Pipeline #166836 passed
before_script:
- for ip in $(dig @8.8.8.8 github.com +short); do ssh-keyscan github.com,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts
- for ip in $(dig @8.8.8.8 git.xx.network +short); do ssh-keyscan git.xx.network,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts
- swift --version
- xcodebuild -version
stages:
- test
test-package-macos:
stage: test
tags:
- ios
script:
- ./run-tests.sh macos
retry: 1
test-package-ios:
stage: test
tags:
- ios
script:
- ./run-tests.sh ios
retry: 1
#!/bin/sh
set -e
if [ "$1" = "macos" ]; then
echo "\n\033[1;32m▶ Running package tests on macOS...\033[0m"
set -o pipefail && swift test | ./xcbeautify
elif [ "$1" = "ios" ]; then
echo "\n\033[1;32m▶ Running package tests on iOS Simulator...\033[0m"
set -o pipefail && xcodebuild -scheme 'xx-client-ios-db-Package' -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=16.0,name=iPhone 14' test | ./xcbeautify
else
echo "\n\033[1;31m▶ Invalid option.\033[0m Usage:"
echo " run-tests.sh macos - Run package tests on macOS"
echo " run-tests.sh ios - Run package tests on iOS Simulator"
exit 1
fi
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment