Convert Example Apps to TypeScript and Add Expo Support #2653
Workflow file for this run
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, pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/[email protected] | |
with: | |
node-version: 18.x | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v4 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Run test | |
run: | | |
yarn | |
yarn lint | |
build-ios: | |
runs-on: macos-latest | |
steps: | |
# Checkout the code | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
# Set up Node.js environment | |
- name: Set up Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 18.x | |
# Cache Yarn dependencies to speed up the build | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v4 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# Install dependencies | |
- name: Install dependencies | |
run: yarn | |
# Prebuild the iOS folder for Expo | |
- name: Prebuild iOS with Expo | |
working-directory: apps/external-display-example | |
run: | | |
yarn expo prebuild --platform ios | |
# Install xcpretty for better build output | |
- name: Install xcpretty | |
run: gem install xcpretty | |
# Build the iOS app using Xcode (with xcpretty) | |
- name: Build iOS App (Debug) with xcpretty | |
working-directory: apps/external-display-example/ios | |
run: | | |
set -o pipefail && xcodebuild \ | |
-workspace externaldisplayexample.xcworkspace \ | |
-scheme external-display-example \ | |
-configuration Debug \ | |
-sdk iphonesimulator \ | |
-derivedDataPath build | xcpretty --no-color | |
build-android: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the code | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
# Set up Node.js environment | |
- name: Set up Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 18.x | |
# Install Java 17 | |
- name: Set up Java 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
# Cache Yarn dependencies to speed up the build | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v4 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# Install dependencies | |
- name: Install dependencies | |
run: yarn | |
# Prebuild the Android folder for Expo | |
- name: Prebuild Android with Expo | |
working-directory: apps/external-display-example | |
run: | | |
yarn expo prebuild --platform android | |
# Build the APK without running on a device | |
- name: Build Android APK | |
working-directory: apps/external-display-example/android | |
run: ./gradlew assembleDebug |