Skip to content

Commit

Permalink
Merge pull request #387 from pusher/ci
Browse files Browse the repository at this point in the history
PS-140 | CI Support (Github Actions)
  • Loading branch information
fbenevides authored Jul 28, 2022
2 parents 4690eb0 + 5a97aa6 commit 7d8d2b8
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
pull_request:
branches: [ master ]

jobs:
run-tests:
runs-on: macos-latest
strategy:
matrix:
os: ['tvOS', 'watchOS', 'iOS']
steps:
- uses: actions/checkout@v2
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '13.2.1'
- uses: actions/cache@v1
id: carthage-cache
with:
path: Carthage
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
- name: Build
if: steps.carthage-cache.outputs.cache-hit != 'true'
run: |
sh ./Consumption-Tests/Shared/carthage.sh bootstrap --cache-builds --use-xcframeworks
- uses: futureware-tech/simulator-action@v1
id: simulator
with:
os: ${{ matrix.os }}
- name: "Run ${{ matrix.os }} Tests"
run: |
set -o pipefail && env NSUnbufferedIO=YES xcodebuild \
-project PusherSwift.xcodeproj \
-scheme PusherSwift \
build \
COMPILER_INDEX_STORE_ENABLE=NO \
test \
-destination "id=${{ steps.simulator.outputs.udid }}" \
| xcpretty --color
2 changes: 1 addition & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ identifier_name:

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

0 comments on commit 7d8d2b8

Please sign in to comment.