Skip to content

Commit 7d8d2b8

Browse files
authored
Merge pull request #387 from pusher/ci
PS-140 | CI Support (Github Actions)
2 parents 4690eb0 + 5a97aa6 commit 7d8d2b8

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
jobs:
8+
run-tests:
9+
runs-on: macos-latest
10+
strategy:
11+
matrix:
12+
os: ['tvOS', 'watchOS', 'iOS']
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: maxim-lobanov/setup-xcode@v1
16+
with:
17+
xcode-version: '13.2.1'
18+
- uses: actions/cache@v1
19+
id: carthage-cache
20+
with:
21+
path: Carthage
22+
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
23+
- name: Build
24+
if: steps.carthage-cache.outputs.cache-hit != 'true'
25+
run: |
26+
sh ./Consumption-Tests/Shared/carthage.sh bootstrap --cache-builds --use-xcframeworks
27+
- uses: futureware-tech/simulator-action@v1
28+
id: simulator
29+
with:
30+
os: ${{ matrix.os }}
31+
- name: "Run ${{ matrix.os }} Tests"
32+
run: |
33+
set -o pipefail && env NSUnbufferedIO=YES xcodebuild \
34+
-project PusherSwift.xcodeproj \
35+
-scheme PusherSwift \
36+
build \
37+
COMPILER_INDEX_STORE_ENABLE=NO \
38+
test \
39+
-destination "id=${{ steps.simulator.outputs.udid }}" \
40+
| xcpretty --color

.swiftlint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ identifier_name:
2727

2828
# This generates a compiler error if more than this many SwiftLint warnings are present
2929
# (This threshold can become more restrictive as remaining warnings are resolved via refactoring)
30-
warning_threshold: 10
30+
warning_threshold: 100

0 commit comments

Comments
 (0)