summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/ios.yml
blob: 4a055735c8e14d7acceca51df5b24df31c314f58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: iOS app CI
on:
    push:
        paths:
            - .github/workflows/ios.yml
            - ios/**
    # Build if requested manually from the Actions tab
    workflow_dispatch:
jobs:
    test:
        name: Unit tests
        runs-on: macos-10.15
        strategy:
            matrix:
                destination: ['platform=iOS Simulator,OS=12.4,name=iPhone 8']
        steps:
            - name: Checkout repository
              uses: actions/checkout@v2

            - name: Setup go-lang
              uses: actions/setup-go@v2
              with:
                  go-version: '1.16.5'

            - name: Prepare iOS 12 simulator
              run: |
                  sudo mkdir -p /Library/Developer/CoreSimulator/Profiles/Runtimes
                  sudo ln -s /Applications/Xcode_10.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 12.4.simruntime

            - name: Build and test
              run: |
                  xcodebuild clean test -project MullvadVPN.xcodeproj -scheme MullvadVPNTests -destination "${destination}" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=YES
              working-directory: ios
              env:
                  destination: ${{ matrix.destination }}