-
Notifications
You must be signed in to change notification settings - Fork 113
54 lines (52 loc) · 1.69 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
name: Build & Test
on:
- push
- pull_request
jobs:
ios:
name: "Build & Test (Xcode ${{ matrix.env.xcode }}, ${{ matrix.env.runtime }}, ${{ matrix.env.device }})"
runs-on: macOS-12
strategy:
matrix:
env:
- xcode: 14.2
runtime: "iOS 13.7"
device: "iPhone 6s"
- xcode: 14.2
runtime: "iOS 14.5"
device: "iPhone 8 Plus"
- xcode: 14.2
runtime: "iOS 15.4"
device: "iPhone 12 mini"
- xcode: 14.2
runtime: "iOS 16.2"
device: "iPhone 14 Pro Max"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: "Select Xcode ${{ matrix.env.xcode }}"
uses: ./.github/actions/xcode-select
with:
version: ${{ matrix.env.xcode }}
- name: "Cache downloaded simulator runtimes"
uses: actions/cache@v3
with:
path: ~/Library/Caches/XcodeInstall/*.dmg
key: Xcode ${{ matrix.env.xcode }}+${{ matrix.env.runtime }}
- name: "Prepare simulator"
id: prepare-simulator
uses: ./.github/actions/prepare-simulator
with:
runtime: ${{ matrix.env.runtime }}
device: ${{ matrix.env.device }}
- name: "Build and test"
run: |
set -o pipefail
xcodebuild test -workspace "Authenticator.xcworkspace" -scheme "Authenticator" -destination "id=${{ steps.prepare-simulator.outputs.destination-id }}" | xcpretty -c
- uses: sersoft-gmbh/swift-coverage-action@v3
with:
target-name-filter: ^Authenticator$
- uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true