Skip to content

fix: perform operations inside shadowTreeWillCommit hook #63

fix: perform operations inside shadowTreeWillCommit hook

fix: perform operations inside shadowTreeWillCommit hook #63

Workflow file for this run

name: ✨ Validate iOS
on:
push:
branches:
- main
paths:
- ".github/workflows/verify-ios.yml"
- "ios/**"
pull_request:
branches:
- main
paths:
- ".github/workflows/verify-ios.yml"
- "ios/**"
jobs:
check-swift-files:
runs-on: ubuntu-latest
outputs:
has-swift-files: ${{ steps.filter.outputs.swift-files }}
steps:
- uses: actions/checkout@v4
- name: Check for Swift files in ios directory
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
swift-files: 'ios/**/*.swift'
swift-lint:
runs-on: ubuntu-latest
name: 🔎 Swift Lint
needs: check-swift-files
if: ${{ needs.check-swift-files.outputs.has-swift-files == 'true' }}
steps:
- uses: actions/checkout@v4
- name: Run SwiftLint GitHub Action (--strict)
uses: norio-nomura/action-swiftlint@master
with:
args: --strict
env:
WORKING_DIRECTORY: ios
format:
runs-on: macOS-15
name: 📚 Swift Format
defaults:
run:
working-directory: ./ios
steps:
- uses: actions/checkout@v4
- name: Install SwiftFormat
run: brew install swiftformat
- name: Format Swift code
run: swiftformat --verbose .
- name: Verify that the formatted code hasn't been changed
run: git diff --exit-code HEAD
objc-lint:
runs-on: macOS-15
name: 🔎 ObjC Lint
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Verify formatting
run: npm run lint-clang