Skip to content

chore: rebuild project #7

chore: rebuild project

chore: rebuild project #7

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
types:
- checks_requested
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v4
- 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@v4
- name: Setup
uses: ./.github/actions/setup
- name: Build package
run: yarn build
- name: Check for unstaged files
uses: ./.github/actions/check-unstaged-files
build-web:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- name: Build package
run: yarn build
- name: Build example for Web
run: |
yarn example expo export --platform web
- name: Check for unstaged files
uses: ./.github/actions/check-unstaged-files
build-ios-dev:
runs-on: macos-latest
outputs:
app-path: ${{ steps.build.outputs.app-path }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- name: Build package
run: yarn build
- name: Cache iOS development build
id: ios-dev-cache
uses: actions/cache@v4
with:
path: |
example/ios/build
example/ios/DerivedData
key: ios-dev-${{ runner.os }}-${{ hashFiles('example/ios/**', 'example/package.json', 'package.json') }}
restore-keys: |
ios-dev-${{ runner.os }}-
- name: Build iOS development app
id: build
if: steps.ios-dev-cache.outputs.cache-hit != 'true'
working-directory: example
run: |
# Build the development app
npx expo run:ios --device --configuration Debug --no-install --no-bundler
# Find the built .app bundle
APP_PATH=$(find ios/build -name "*.app" -type d | head -n 1)
echo "Built app at: $APP_PATH"
echo "app-path=$APP_PATH" >> $GITHUB_OUTPUT
# Create a tar for better caching
tar -czf ios-dev-build.tar.gz -C "$(dirname "$APP_PATH")" "$(basename "$APP_PATH")"
- name: Upload development build
if: steps.ios-dev-cache.outputs.cache-hit != 'true'
uses: actions/upload-artifact@v4
with:
name: ios-dev-build
path: example/ios-dev-build.tar.gz
retention-days: 1
# maestro-ios:
# runs-on: macos-latest
# needs: build-ios-dev
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Setup Maestro
# uses: ./.github/actions/maestro
# - name: Download development build
# uses: actions/download-artifact@v4
# with:
# name: ios-dev-build
# path: ./
# - name: Extract and install app
# run: |
# # Extract the app bundle
# tar -xzf ios-dev-build.tar.gz
# APP_PATH=$(find . -name "*.app" -type d | head -n 1)
# if [ -z "$APP_PATH" ]; then
# echo "No .app bundle found after extraction"
# exit 1
# fi
# echo "Installing app from: $APP_PATH"
# xcrun simctl install $DEVICE_ID "$APP_PATH"
# # Get the app bundle ID for launching
# APP_BUNDLE_ID=$(plutil -extract CFBundleIdentifier raw "$APP_PATH/Info.plist")
# echo "APP_BUNDLE_ID=$APP_BUNDLE_ID" >> $GITHUB_ENV
# - name: Run Maestro tests
# run: |
# # Ensure the simulator is booted before running tests
# if [ -z "$DEVICE_ID" ]; then
# echo "No simulator found. Exiting."
# exit 1
# fi
# # Launch the app first
# xcrun simctl launch $DEVICE_ID $APP_BUNDLE_ID
# maestro test --device-id "$DEVICE_ID" --test-dir src/__tests__/e2e --report-dir src/__tests__/e2e/reports