Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK-3831] CI job for iOS 17 #1802

Closed
wants to merge 11 commits into from
123 changes: 123 additions & 0 deletions .github/workflows/integration-test-iOS17_0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: "Integration Test: iOS 17.0"

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 (15.0)
run: |
sudo xcode-select -s /Applications/Xcode_15.0.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_iOS17_0

- 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_iOS17_0
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_iOS17_0"

- 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
2 changes: 1 addition & 1 deletion Test/Tests/RestClientTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1822,7 +1822,7 @@ class RestClientTests: XCTestCase {
let url = try XCTUnwrap(request.url, "No request url found")
let acceptHeaderValue = try XCTUnwrap(request.allHTTPHeaderFields?["Accept"], "Accept HTTP Header is missing")

XCTAssertEqual(request.httpMethod, "patch")
XCTAssertEqual(request.httpMethod!.uppercased(), "PATCH")
lawrence-forooghian marked this conversation as resolved.
Show resolved Hide resolved
XCTAssertEqual(url.absoluteString, "https://rest.ably.io:443/feature?foo=1")
XCTAssertEqual(acceptHeaderValue, "application/x-msgpack,application/json")
}
Expand Down
1 change: 1 addition & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ platform :ios do

LANE_CONFIGS = [
LaneConfig.new(:test_iOS16_2, "Ably-iOS", ["iPhone 14 (16.2)"]),
LaneConfig.new(:test_iOS17_0, "Ably-iOS", ["iPhone 14 (17.0)"]),
LaneConfig.new(:test_tvOS16_1, "Ably-tvOS", ["Apple TV 4K (2nd generation) (16.1)"]),
LaneConfig.new(:test_macOS, "Ably-macOS")
]
Expand Down