-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (43 loc) · 1.61 KB
/
test.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
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
name: Test
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
test:
runs-on: macos-14
env:
DEVELOPER_DIR: /Applications/Xcode_15.3.app/Contents/Developer
steps:
- uses: actions/checkout@v4
- name: Cache Swift Packages
uses: actions/cache@v4
id: cache-swiftpm
with:
path: .swiftpm
key: ${{ runner.os }}-swiftpm-${{ hashFiles('WebSocketClient.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
- name: Write IDESkipPackagePluginFingerprintValidatation
run: defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES
- name: Write IDESkipMacroFingerprintValidation
run: defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES
- name: Make test-result folder
run: mkdir -p test-results
- name: Xcode test
run: |
set -o pipefail && \
xcodebuild test \
-scheme WebSocketClientPackageTests \
-workspace WebSocketClient.xcworkspace \
-parallel-testing-enabled=YES \
-destination "platform=iOS Simulator,name=iPhone 15 Pro" \
-resultBundlePath "Test-WebSocketClientPackageTests.xcresult" \
-clonedSourcePackagesDirPath .swiftpm \
-disableAutomaticPackageResolution | xcpretty
- uses: kishikawakatsumi/xcresulttool@v1
if: success() || failure()
with:
path: Test-WebSocketClientPackageTests.xcresult