Test on MacOS 13 #191
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: Build main target | |
on: | |
pull_request: | |
paths: | |
- '.github/workflows/**' | |
- NextcloudTalk.xcodeproj/** | |
- NextcloudTalk/** | |
- NextcloudTalkUITests/** | |
- NotificationServiceExtension/** | |
- ShareExtension/** | |
push: | |
branches: | |
- main | |
- master | |
- stable* | |
permissions: | |
contents: read | |
jobs: | |
build-and-test: | |
name: Build and Test | |
runs-on: macos-13 | |
if: github.event.pull_request.draft == false | |
strategy: | |
matrix: | |
# Test with stable23 as well to find regressions in older versions | |
test-branches: ['stable23', 'stable27', 'master'] | |
env: | |
WORKSPACE: NextcloudTalk.xcworkspace | |
DESTINATION: platform=iOS Simulator,name=iPhone 14,OS=16 | |
SCHEME: NextcloudTalk | |
TEST_BRANCH: ${{ matrix.test-branches }} | |
CONTAINER_NAME: nextcloud_test | |
SERVER_PORT: 8080 | |
steps: | |
- name: Checkout app | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: actions/cache@v3 | |
with: | |
path: Pods | |
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-pods- | |
- uses: actions/cache@v3 | |
with: | |
path: SourcePackages | |
key: ${{ runner.os }}-spm-${{ hashFiles('NextcloudTalk.xcworkspace/xcshareddata/swiftpm/Package.resolved') }} | |
restore-keys: | | |
${{ runner.os }}-spm- | |
- name: Install docker | |
run: | | |
brew install colima | |
brew install docker | |
colima start | |
- name: Create docker test server | |
run: | | |
source ./ci-create-docker-server.sh | |
- name: Set up dependencies talk-ios | |
run: | | |
pod install | |
- name: Wait for server | |
run: | | |
source ./ci-wait-for-server.sh | |
- name: Install talk | |
run: | | |
source ./ci-install-talk.sh | |
- name: Build & Test NextcloudTalk iOS | |
run: | | |
set -o pipefail && xcodebuild test -workspace $WORKSPACE \ | |
-scheme "$SCHEME" \ | |
-destination "$DESTINATION" \ | |
-test-iterations 3 \ | |
-retry-tests-on-failure \ | |
-resultBundlePath "testResult.xcresult" \ | |
-clonedSourcePackagesDirPath SourcePackages \ | |
| xcpretty | |
- name: Upload test results | |
uses: actions/upload-artifact@v3 | |
if: ${{ !cancelled() }} | |
with: | |
name: testResults-${{ matrix.test-branches }}.xcresult | |
path: "testResult.xcresult" |