fix: perform operations inside shadowTreeWillCommit hook
#63
This file contains hidden or 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: ✨ 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 |