-
-
Notifications
You must be signed in to change notification settings - Fork 6
28 lines (25 loc) · 1.01 KB
/
swift.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
name: Swift
on: [push]
jobs:
build:
runs-on: macOS-latest
strategy:
matrix:
destination: ['platform=iOS Simulator,OS=13.1,name=iPhone 11']
xcode: ['/Applications/Xcode_12.app/Contents/Developer']
steps:
- uses: actions/checkout@v1
# Github Actions' machines do in fact have recent versions of Xcode,
# but you may have to explicitly switch to them. We explicitly want
# to use Xcode 12, so we use xcode-select to switch to it.
- name: Switch to Xcode 12
run: sudo xcode-select --switch /Applications/Xcode_12.app
# Since we want to be running our tests from Xcode, we need to
# generate an .xcodeproj file. Luckly, Swift Package Manager has
# build in functionality to do so.
- name: Generate xcodeproj
run: swift package generate-xcodeproj
# Finally, we invoke xcodebuild to run the tests on an iPhone 11
# simulator.
- name: Run tests
run: xcodebuild test -destination 'name=iPhone 11' -scheme 'SwiftUIKit-Package'