Skip to content

EMBR-5327 linting updates #320

EMBR-5327 linting updates

EMBR-5327 linting updates #320

Workflow file for this run

name: iOS Unit Tests
on:
push:
branches: [main]
pull_request:
jobs:
build:
strategy:
matrix:
node-version: [18.x]
os: [macos-latest]
runs-on: ${{ matrix.os }}
env:
IOS_TEST_OS: 17.5
IOS_TEST_PLATFORM: iOS Simulator
IOS_TEST_DEVICE: iPhone 15 Pro
IOS_TEST_SDK: iphonesimulator
IOS_TEST_WAIT_TIME: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Node (${{ matrix.node-version }})
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Enables corepack
run: corepack enable
- uses: dorny/paths-filter@v3
id: changed_files
with:
list-files: shell
filters: |
ios:
- 'packages/**/*.swift'
- 'packages/**/*.m'
- 'packages/**/*.h'
- name: Cache Derived Data
uses: actions/cache@v4
with:
path: ~/Library/Developer/Xcode/DerivedData
key: Derived-Data-${{ runner.os }}-${{ hashFiles('**/*.xcodeproj/project.pbxproj, Podfile.lock') }}
restore-keys: |
Derived-Data-${{ runner.os }}
if: steps.changed_files.outputs.ios == 'true'
- name: Install Root Node Modules
run: yarn install
if: steps.changed_files.outputs.ios == 'true'
- name: Linting
run: yarn run lint:swift
if: steps.changed_files.outputs.ios == 'true'
- name: Install Node Modules + CocoaPods Dependencies
run: yarn run ios:install
if: steps.changed_files.outputs.ios == 'true'
- name: Run iOS Unit Tests
run: yarn run ios:test $(./scopes-from-file-changes.ts ${{ steps.changed_files.outputs.ios_files }})
if: steps.changed_files.outputs.ios == 'true'