-
Notifications
You must be signed in to change notification settings - Fork 25
131 lines (110 loc) · 4.24 KB
/
integration-test-iOS16_4.yaml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: "Integration Test: iOS 16.4"
on:
pull_request:
push:
branches:
- main
# IMPORTANT NOTES:
# - Changes made to this file needs to replicated across other integration-test-*.yaml files.
# - The Fastlane lane name is duplicated in more than one place within this workflow.
jobs:
check:
runs-on: macos-13
env:
LC_CTYPE: en_US.UTF-8
LANG: en_US.UTF-8
ABLY_ENV: sandbox
steps:
- name: Check out SDK repo
uses: actions/checkout@v2
- name: Select Specific Xcode Version (14.3)
run: |
sudo xcode-select -s /Applications/Xcode_14.3.app
echo "Selected Xcode version:"
xcodebuild -version
- name: Log environment information
run: ./Scripts/log-environment-information.sh
- name: Check out xcparse repo
uses: actions/checkout@v3
with:
repository: ably-forks/xcparse
ref: emit-test-case-info
path: xcparse
- id: get-xcparse-commit-sha
name: Get xcparse commit SHA
run: |
cd xcparse
echo "::set-output name=sha::$(git rev-parse HEAD)"
- name: "actions/cache@v3 (xcparse binary)"
uses: actions/cache@v3
with:
path: xcparse/.build/debug/xcparse
key: ${{ runner.os }}-xcparse-${{ steps.get-xcparse-commit-sha.outputs.sha }}
- name: Reset Simulators
run: xcrun simctl erase all
- name: Install Dependencies and Run Tests
run: |
brew install xcbeautify
make submodules
bundle install
make update_carthage_dependencies_ios
bundle exec fastlane test_iOS16_4
- name: Check Static Analyzer Output
id: analyzer-output
run: |
if [[ -z $(find ./derived_data -name "report-*.html") ]]; then
echo "Static Analyzer found no issues."
else
echo "Static Analyzer found some issues. HTML report will be available in Artifacts section. Failing build."
exit 1
fi
- name: Static Analyzer Reports Uploading
if: ${{ failure() && steps.analyzer-output.outcome == 'failure' }}
uses: actions/upload-artifact@v2
with:
name: static-analyzer-reports-test_iOS16_4
path: ./derived_data/**/report-*.html
- name: Run Examples Tests
working-directory: ./Examples/Tests
run: |
pod repo update
pod install
bundle exec fastlane scan -s Tests --output-directory "fastlane/test_output/examples/test_iOS16_4"
- name: Build APNS Example Project
working-directory: ./Examples/AblyPush
run: |
xcodebuild build -scheme "AblyPushExample" -destination "platform=iOS Simulator,name=iPhone 14" -configuration "Debug"
- name: Xcodebuild Logs Artifact
if: always()
uses: actions/upload-artifact@v2
with:
name: xcodebuild-logs
path: ~/Library/Developer/Xcode/DerivedData/*/Logs
- name: Upload test output artifact
if: always()
uses: actions/upload-artifact@v2
with:
name: test-output
path: fastlane/test_output
- name: Upload test results to observability server
if: always()
env:
TEST_OBSERVABILITY_SERVER_AUTH_KEY: ${{ secrets.TEST_OBSERVABILITY_SERVER_AUTH_KEY }}
run: Scripts/upload_test_results.sh
- name: Swift Package Manager - Installation Test
working-directory: ./
run: |
echo 'Current Branch: ' $GITHUB_HEAD_REF
echo 'Current Revision (SHA):' $GITHUB_SHA
echo Current Path: $(pwd)
export PACKAGE_URL=file://$(pwd)
export PACKAGE_BRANCH_NAME=$GITHUB_HEAD_REF
export PACKAGE_REVISION=$GITHUB_SHA
swift test --package-path Examples/SPM -v
- name: Carthage - Installation Test
working-directory: ./Examples/AblyCarthage
run: |
echo 'Installing cathage dependencies...'
carthage update --use-xcframeworks --platform iOS --no-use-binaries
echo 'Building AblyCarthage example...'
xcodebuild build -scheme "AblyCarthage" -destination "platform=iOS Simulator,name=iPhone 14" -configuration "Debug"