Skip to content

Commit c89572e

Browse files
committed
Add visionOS CI workflow.
1 parent 963542e commit c89572e

File tree

2 files changed

+114
-0
lines changed

2 files changed

+114
-0
lines changed
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: "Integration Test"
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
10+
# IMPORTANT NOTES:
11+
# - Changes made to this file needs to replicated across other integration-test-*.yaml files.
12+
# - The Fastlane lane name is duplicated in more than one place within this workflow.
13+
14+
jobs:
15+
check:
16+
runs-on: macos-13
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
23+
- platform: visionOS
24+
lane: test_visionOS_1_0
25+
26+
env:
27+
LC_CTYPE: en_US.UTF-8
28+
LANG: en_US.UTF-8
29+
ABLY_ENV: sandbox
30+
31+
steps:
32+
- name: Check out repo
33+
uses: actions/checkout@v2
34+
35+
- name: Select Xcode (15.2)
36+
run: |
37+
sudo xcode-select -s /Applications/Xcode_15.2.app
38+
echo "Selected Xcode version:"
39+
xcodebuild -version
40+
41+
- name: Environment Info
42+
run: ./Scripts/log-environment-information.sh
43+
44+
- name: Check out xcparse repo
45+
uses: actions/checkout@v3
46+
with:
47+
repository: ably-forks/xcparse
48+
ref: emit-test-case-info
49+
path: xcparse
50+
51+
- id: get-xcparse-commit-sha
52+
name: Get xcparse commit SHA
53+
run: |
54+
cd xcparse
55+
echo "::set-output name=sha::$(git rev-parse HEAD)"
56+
57+
- name: "actions/cache@v3 (xcparse binary)"
58+
uses: actions/cache@v3
59+
with:
60+
path: xcparse/.build/debug/xcparse
61+
key: ${{ runner.os }}-xcparse-${{ steps.get-xcparse-commit-sha.outputs.sha }}
62+
63+
- name: Reset Simulators
64+
run: xcrun simctl erase all
65+
66+
- name: Install Dependencies
67+
run: |
68+
brew install xcbeautify
69+
make submodules
70+
bundle install
71+
72+
- name: Run Tests
73+
run: bundle exec fastlane ${{ matrix.lane }}
74+
75+
- name: Check Static Analyzer Output
76+
id: analyzer-output
77+
run: |
78+
if [[ -z $(find ./derived_data -name "report-*.html") ]]; then
79+
echo "Static Analyzer found no issues."
80+
else
81+
echo "Static Analyzer found some issues. HTML report will be available in Artifacts section. Failing build."
82+
exit 1
83+
fi
84+
85+
- name: Upload Static Analyzer Reports
86+
if: ${{ failure() && steps.analyzer-output.outcome == 'failure' }}
87+
uses: actions/upload-artifact@v4
88+
with:
89+
name: static-analyzer-reports-${{ matrix.lane }}
90+
path: ./derived_data/**/report-*.html
91+
92+
- name: Upload Xcodebuild Logs
93+
if: always()
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: xcodebuild-logs-${{ matrix.lane }}
97+
path: ~/Library/Developer/Xcode/DerivedData/*/Logs
98+
99+
- name: Upload Test Output
100+
if: always()
101+
uses: actions/upload-artifact@v4
102+
with:
103+
name: test-output-${{ matrix.lane }}
104+
path: fastlane/test_output
105+
106+
- name: Upload Test Results
107+
if: always()
108+
env:
109+
TEST_OBSERVABILITY_SERVER_AUTH_KEY: ${{ secrets.TEST_OBSERVABILITY_SERVER_AUTH_KEY }}
110+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111+
run: |
112+
Scripts/upload_test_results.sh --job-name "check (${{ matrix.platform }}, ${{ matrix.lane }})"
113+

fastlane/Fastfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ platform :ios do
2424
LANE_CONFIGS = [
2525
LaneConfig.new(:test_iOS17_2, "Ably-iOS", ["iPhone 15 (17.2)"]),
2626
LaneConfig.new(:test_tvOS17_2, "Ably-tvOS", ["Apple TV (17.2)"]),
27+
LaneConfig.new(:test_visionOS_1_0, "Ably-visionOS", ["Apple Vision Pro"]),
2728
LaneConfig.new(:test_macOS, "Ably-macOS")
2829
]
2930

0 commit comments

Comments
 (0)