Files
FrenoCorp/.github/workflows/ios-ci.yml
Michael Freno 5b31f088cc Fix CI/CD pipeline issues from code review FRE-4690
- web-ci.yml: Remove web/ path refs (app is at repo root), fix cache paths, update Vercel action to v30
- ios-ci.yml: Fix swift-format tool name, use debug build for PR CI, add TestFlight deployment job, use env var for Xcode path
- Scaffold package.json, tsconfig.json, vite.config.ts for web project at root
2026-05-10 04:53:24 -04:00

106 lines
2.8 KiB
YAML

name: iOS CI
on:
push:
branches: [main]
paths:
- "Lendair/**"
- ".github/workflows/ios-ci.yml"
pull_request:
branches: [main]
paths:
- "Lendair/**"
- ".github/workflows/ios-ci.yml"
concurrency:
group: ios-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Swift Lint
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode
run: sudo xcode-select -s ${{ env.XCODE_APP_PATH || '/Applications/Xcode_15.4.app' }}
env:
XCODE_APP_PATH: ${{ vars.XCODE_APP_PATH || '/Applications/Xcode_15.4.app' }}
- name: Swift Format Check
run: |
swift-format lint --recursive Lendair/Models Lendair/Services Lendair/ViewModels Lendair/Views || {
echo "::warning::Swift format issues detected (non-blocking)"
}
build:
name: Build
runs-on: macos-latest
needs: lint
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode
run: sudo xcode-select -s ${{ env.XCODE_APP_PATH || '/Applications/Xcode_15.4.app' }}
env:
XCODE_APP_PATH: ${{ vars.XCODE_APP_PATH || '/Applications/Xcode_15.4.app' }}
- name: Swift version
run: swift --version
- name: Resolve dependencies
run: swift package resolve
working-directory: Lendair
- name: Build
run: swift build
working-directory: Lendair
test:
name: Test
runs-on: macos-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode
run: sudo xcode-select -s ${{ env.XCODE_APP_PATH || '/Applications/Xcode_15.4.app' }}
env:
XCODE_APP_PATH: ${{ vars.XCODE_APP_PATH || '/Applications/Xcode_15.4.app' }}
- name: Run tests
run: swift test
working-directory: Lendair
deploy-testflight:
name: Deploy to TestFlight
runs-on: macos-latest
needs: test
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode
run: sudo xcode-select -s ${{ env.XCODE_APP_PATH || '/Applications/Xcode_15.4.app' }}
env:
XCODE_APP_PATH: ${{ vars.XCODE_APP_PATH || '/Applications/Xcode_15.4.app' }}
- name: Build for TestFlight
run: swift build -c release
working-directory: Lendair
- name: Upload to TestFlight
uses: apple-actions/upload-testflight-binary@v1
with:
app-path: Lendair/.build/release/Lendair
github-token: ${{ secrets.GITHUB_TOKEN }}
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}