-
Notifications
You must be signed in to change notification settings - Fork 164
79 lines (77 loc) · 2.97 KB
/
test.yml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Run Tests
on:
pull_request:
branches:
- develop
push:
branches:
- develop
jobs:
tests-ios:
runs-on: macos-13
strategy:
matrix:
include: # selection of https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#installed-sdks
- xcode: "14.3.1"
ios: "16.4"
device: "iPhone 14"
# - xcode: "12.5.1"
# ios: "14.5"
# device: "iPhone 8"
if: github.event_name == 'pull_request' # if only run pull request when multiple trigger workflow
name: "test ios ${{matrix.ios}}"
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- name: pod install
run: pod install || pod install --repo-update
- name: "Select Xcode ${{matrix.xcode}}"
run: sudo xcode-select -switch /Applications/Xcode_${{matrix.xcode}}.app && /usr/bin/xcodebuild -version
- name: Run Unit Tests on ${{matrix.ios}} ${{matrix.device}}
run: xcodebuild -workspace MatomoTracker.xcworkspace -scheme 'MatomoTracker' -sdk 'iphonesimulator' -destination 'platform=iOS Simulator,name=${{matrix.device}},OS=${{matrix.ios}}' -configuration Debug clean test
tests-demo-builds:
runs-on: macos-13
strategy:
matrix:
include:
- scheme: "ios"
sdk: "iphonesimulator"
destination: "platform=iOS Simulator,name=iPhone 14,OS=16.4"
xcode: "14.3.1"
- scheme: "macos"
sdk: "macosx"
destination: "platform=macOS,arch=x86_64"
xcode: "14.3.1"
- scheme: "tvos"
sdk: "appletvsimulator"
destination: "platform=tvOS Simulator,name=Apple TV,OS=16.4"
xcode: "14.3.1"
if: github.event_name == 'pull_request' # if only run pull request when multiple trigger workflow
name: "test demo build ${{matrix.scheme}}"
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- name: pod install
run: pod install || pod install --repo-update
- name: "Select Xcode ${{matrix.xcode}}"
run: sudo xcode-select -switch /Applications/Xcode_${{matrix.xcode}}.app && /usr/bin/xcodebuild -version
- name: Build Demo for ${{matrix.scheme}}
run: xcodebuild -workspace MatomoTracker.xcworkspace -scheme '${{matrix.scheme}}' -sdk '${{matrix.sdk}}' -destination '${{matrix.destination}}' -configuration Release clean build
tests-package-managers:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: "Select Xcode 14.3.1"
run: sudo xcode-select -switch /Applications/Xcode_14.3.1.app && /usr/bin/xcodebuild -version
# Carthage doesn't work well with Matomo anymore
# https://github.com/Carthage/Carthage/issues/3146
# - name: "Build Carthage"
# run: carthage build --no-skip-current
- name: "Test SPM"
run: swift build