feat: added variants implementation and unit tests #176
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Contentstack CI" | |
on: | |
push: | |
branches: [ master, next ] | |
pull_request: | |
branches: [ master, next ] | |
jobs: | |
macOS: | |
name: Test macOS | |
runs-on: macos-latest | |
env: | |
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
path: Carthage | |
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }} | |
restore-keys: | | |
${{ runner.os }}-carthage- | |
- name: Dependencies | |
run: carthage bootstrap --no-use-binaries --platform macOS --use-xcframeworks | |
- name: Dependency libxml2 | |
run: brew install libxml2 && brew link --force libxml2 | |
- name: macOS | |
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Contentstack.xcworkspace" -scheme "Contentstack macOS" SWIFT_ACTIVE_COMPILATION_CONDITIONS="NO_FATAL_TEST" -destination "platform=macOS" test | xcpretty | |
iOS: | |
name: Test iOS | |
runs-on: macos-latest | |
env: | |
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer | |
strategy: | |
matrix: | |
destination: ["OS=16.2,name=iPhone 14 Pro"] | |
steps: | |
- uses: actions/checkout@v1 | |
# with: | |
# path: Carthage | |
# key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }} | |
# restore-keys: | | |
# ${{ runner.os }}-carthage- | |
# - name: Dependencies | |
# run: carthage bootstrap --no-use-binaries --platform iOS --use-xcframeworks | |
# Step 2: Set up dependencies | |
# - name: Dependencies | |
# run: | | |
# # Check if the machine is running on Apple Silicon | |
# if [[ "$(uname -m)" == "arm64" ]]; then | |
# # Use Rosetta to run Carthage in x86_64 mode on Apple Silicon | |
# arch -x86_64 carthage bootstrap --no-use-binaries --platform iOS --use-xcframeworks | |
# else | |
# # Run Carthage normally on Intel machines | |
# carthage bootstrap --no-use-binaries --platform iOS --use-xcframeworks | |
# fi | |
# Resolve dependencies using Swift Package Manager | |
- name: Resolve dependencies | |
run: swift package resolve | |
- name: iOS - ${{ matrix.destination }} | |
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Contentstack.xcworkspace" -scheme "Contentstack iOS" SWIFT_ACTIVE_COMPILATION_CONDITIONS="NO_FATAL_TEST" -destination "${{ matrix.destination }}" test | xcpretty | |
tvOS: | |
name: Test tvOS | |
runs-on: macos-latest | |
env: | |
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer | |
strategy: | |
matrix: | |
destination: ["OS=16.1,name=Apple TV 4K (2nd generation)"] | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
path: Carthage | |
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }} | |
restore-keys: | | |
${{ runner.os }}-carthage- | |
- name: Dependencies | |
run: carthage bootstrap --no-use-binaries --platform tvOS --use-xcframeworks | |
- name: tvOS - ${{ matrix.destination }} | |
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Contentstack.xcworkspace" -scheme "Contentstack tvOS" SWIFT_ACTIVE_COMPILATION_CONDITIONS="NO_FATAL_TEST" -destination "${{ matrix.destination }}" test | xcpretty | |
# watchOS: | |
# name: Test watchOS | |
# runs-on: macos-latest | |
# env: | |
# DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer | |
# strategy: | |
# matrix: | |
# destination: ["OS=9.1,name=Apple Watch Series 6 (44mm)"] | |
# steps: | |
# - uses: actions/checkout@v1 | |
# with: | |
# path: Carthage | |
# key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }} | |
# restore-keys: | | |
# ${{ runner.os }}-carthage- | |
# - name: watchOS - ${{ matrix.destination }} | |
# run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Contentstack.xcworkspace" -scheme "Contentstack watchOS" -destination "${{ matrix.destination }}" build | xcpretty |