ci: move test to turbo #315
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-swift: | ||
runs-on: macos-latest | ||
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: test example for iOS | ||
run: | | ||
yarn turbo run test:ios | ||
# - name: Setup | ||
# uses: ./.github/actions/setup | ||
# - name: Set up Xcode | ||
# run: | | ||
# sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer | ||
# xcodebuild -version | ||
# - 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 unit tests swift | ||
# run: | | ||
# cd example/ios | ||
# xcodebuild clean test -workspace TicketmasterIgniteExample.xcworkspace -scheme TicketmasterIgniteExample -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED=NO |