WIP: Add swift tests #323
This file contains 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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Lint files | |
run: yarn lint | |
- name: Typecheck files | |
run: yarn typecheck | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Run unit tests | |
run: yarn test --maxWorkers=2 --coverage | |
build-library: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Build package | |
run: yarn prepare | |
build-android: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Install JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Finalize Android SDK | |
run: | | |
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null" | |
- name: Build example for Android | |
env: | |
JAVA_OPTS: '-XX:MaxHeapSize=6g' | |
run: | | |
yarn turbo run build:android | |
build-ios: | |
runs-on: macos-14 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Install cocoapods | |
run: | | |
cd example/ios | |
pod install | |
env: | |
NO_FLIPPER: 1 | |
- name: Build example for iOS | |
run: | | |
yarn turbo run build:ios | |
test-ios: | |
runs-on: macos-14 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Install cocoapods | |
run: | | |
cd example/ios | |
pod install | |
env: | |
NO_FLIPPER: 1 | |
- name: Clear DerivedData | |
run: | | |
rm -rf ~/Library/Developer/Xcode/DerivedData | |
- name: run tests | |
run: | | |
cd example/ios | |
xcodebuild -workspace TicketmasterIgniteExample.xcworkspace -scheme TicketmasterIgniteExample -destination 'platform=iOS Simulator,name=iPhone 16' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED=NO clean test |