-
Notifications
You must be signed in to change notification settings - Fork 19
67 lines (55 loc) · 1.69 KB
/
ci.yml
File metadata and controls
67 lines (55 loc) · 1.69 KB
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: CI
on:
push:
pull_request:
jobs:
test:
runs-on: macOS-latest
env:
PROJECT: Pure.xcodeproj
SCHEME: Pure-Package
CODECOV_PACKAGE_NAME: Pure
strategy:
matrix:
env:
- test: spm
- test: xcodebuild
sdk: iphonesimulator
destination: platform=iOS Simulator,name=iPhone 11 Pro,OS=latest
- test: xcodebuild
sdk: macosx
destination: arch=x86_64
- test: xcodebuild
sdk: appletvsimulator
destination: platform=tvOS Simulator,name=Apple TV,OS=latest
steps:
- uses: actions/checkout@v1
- name: List SDKs and Devices
run: xcodebuild -showsdks; instruments -s
- name: Generate Xcode Project
if: matrix.env.test == 'xcodebuild'
run: swift package generate-xcodeproj --enable-code-coverage
- name: Build and Test with Xcode
if: matrix.env.test == 'xcodebuild'
run: |
set -o pipefail && xcodebuild clean build test \
-project "$PROJECT" \
-scheme "$SCHEME" \
-sdk "$SDK" \
-destination "$DESTINATION" \
-configuration Debug \
-enableCodeCoverage YES \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty -c;
env:
SDK: ${{ matrix.env.sdk }}
DESTINATION: ${{ matrix.env.destination }}
- name: Build and Test with SPM
if: matrix.env.test == 'spm'
run: set -o pipefail && swift test
- name: Upload Code Coverage
run: |
bash <(curl -s https://codecov.io/bash) \
-X xcodeplist \
-J "$CODECOV_PACKAGE_NAME"
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}