-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (64 loc) · 2.12 KB
/
tests.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
name: Tests
on:
push:
paths:
- '.github/workflows/tests.yml'
- '**/*.swift'
pull_request:
paths:
- '.github/workflows/tests.yml'
- '**/*.swift'
jobs:
swift:
strategy:
fail-fast: false
matrix:
operating-system: ["ubuntu-20.04", "ubuntu-22.04", "macos-12"]
swift-version: ["5.7.1"]
runs-on: ${{ matrix.operating-system }}
steps:
- uses: actions/checkout@v3
- uses: sinoru/actions-setup-xcode@v2
if: ${{ startsWith(matrix.operating-system, 'macos') }}
with:
xcode-version: "14.1"
apple-id: ${{ secrets.APPLE_ID }}
apple-id-password: ${{ secrets.APPLE_ID_PASSWORD }}
- uses: sinoru/actions-setup-swift@v2
with:
swift-version: ${{ matrix.swift-version }}
- name: Build
run: swift build
env:
SWIFT_VERSION: ${{ matrix.swift-version }}
- name: Run tests
run: swift test
env:
SWIFT_VERSION: ${{ matrix.swift-version }}
xcode:
strategy:
fail-fast: false
matrix:
operating-system: ["macos-12"]
xcode-version: ["14.1"]
xcode-destination: [
"platform=OS X,arch=x86_64",
"platform=OS X,arch=x86_64,variant=Mac Catalyst",
"platform=iOS Simulator,name=iPhone 8,OS=latest",
"platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=latest",
"platform=watchOS Simulator,name=Apple Watch Series 5 (44mm),OS=latest",
]
runs-on: ${{ matrix.operating-system }}
steps:
- uses: actions/checkout@v3
- uses: sinoru/actions-setup-xcode@v2
with:
xcode-version: ${{ matrix.xcode-version }}
apple-id: ${{ secrets.APPLE_ID }}
apple-id-password: ${{ secrets.APPLE_ID_PASSWORD }}
- name: Resolve Package Dependencies
run: xcodebuild -resolvePackageDependencies
- name: Analyze
run: xcodebuild -scheme APIKit-Package -destination '${{ matrix.xcode-destination }}' analyze
- name: Test
run: xcodebuild -scheme APIKit-Package -destination '${{ matrix.xcode-destination }}' test