Skip to content

Commit c77873e

Browse files
committed
Add GitHub workflow
1 parent 1ff5bf4 commit c77873e

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
runs-on: macOS-latest
12+
strategy:
13+
matrix:
14+
env:
15+
- sdk: iphonesimulator13.0
16+
destination: platform=iOS Simulator,name=iPhone 11 Pro,OS=13.0
17+
18+
- sdk: macosx10.15
19+
destination: arch=x86_64
20+
21+
- sdk: appletvsimulator13.0
22+
destination: OS=13.0,name=Apple TV
23+
24+
steps:
25+
- uses: actions/checkout@v1
26+
27+
- name: Select Xcode
28+
run: sudo xcode-select -s /Applications/Xcode_11.app
29+
30+
- name: Generate Xcode Project
31+
run: swift package generate-xcodeproj --enable-code-coverage
32+
33+
- name: Build and Test
34+
run: |
35+
set -o pipefail && xcodebuild clean build test \
36+
-project "$PROJECT" \
37+
-scheme "$SCHEME" \
38+
-sdk "$SDK" \
39+
-destination "$DESTINATION" \
40+
-configuration Debug \
41+
-enableCodeCoverage YES \
42+
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty -c;
43+
env:
44+
PROJECT: WeakMapTable.xcodeproj
45+
SCHEME: WeakMapTable-Package
46+
SDK: ${{ matrix.env.sdk }}
47+
DESTINATION: ${{ matrix.env.destination }}
48+
49+
- name: Upload Code Coverage
50+
run: |
51+
bash <(curl -s https://codecov.io/bash) \
52+
-X xcodeplist \
53+
-J WeakMapTable \
54+
-t "$CODECOV_TOKEN"
55+
env:
56+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)