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
This commit is contained in:
47
.github/workflows/ios-ci.yml
vendored
47
.github/workflows/ios-ci.yml
vendored
@@ -25,14 +25,15 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Select Xcode
|
- name: Select Xcode
|
||||||
run: sudo xcode-select -s /Applications/Xcode_15.4.app
|
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
|
- name: Swift Format Check
|
||||||
run: |
|
run: |
|
||||||
swift format --format --recursive Lendair/Models Lendair/Services Lendair/ViewModels Lendair/Views 2>/dev/null || true
|
swift-format lint --recursive Lendair/Models Lendair/Services Lendair/ViewModels Lendair/Views || {
|
||||||
if ! swift format --lint --recursive Lendair/Models Lendair/Services Lendair/ViewModels Lendair/Views 2>/dev/null; then
|
|
||||||
echo "::warning::Swift format issues detected (non-blocking)"
|
echo "::warning::Swift format issues detected (non-blocking)"
|
||||||
fi
|
}
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
@@ -43,7 +44,9 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Select Xcode
|
- name: Select Xcode
|
||||||
run: sudo xcode-select -s /Applications/Xcode_15.4.app
|
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
|
- name: Swift version
|
||||||
run: swift --version
|
run: swift --version
|
||||||
@@ -53,7 +56,7 @@ jobs:
|
|||||||
working-directory: Lendair
|
working-directory: Lendair
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: swift build -c release
|
run: swift build
|
||||||
working-directory: Lendair
|
working-directory: Lendair
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@@ -65,8 +68,38 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Select Xcode
|
- name: Select Xcode
|
||||||
run: sudo xcode-select -s /Applications/Xcode_15.4.app
|
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
|
- name: Run tests
|
||||||
run: swift test
|
run: swift test
|
||||||
working-directory: Lendair
|
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 }}
|
||||||
|
|||||||
27
.github/workflows/web-ci.yml
vendored
27
.github/workflows/web-ci.yml
vendored
@@ -4,22 +4,28 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths:
|
paths:
|
||||||
- "web/**"
|
- "*.json"
|
||||||
|
- "*.ts"
|
||||||
|
- "*.tsx"
|
||||||
|
- "*.js"
|
||||||
|
- "*.jsx"
|
||||||
|
- "*.html"
|
||||||
- ".github/workflows/web-ci.yml"
|
- ".github/workflows/web-ci.yml"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths:
|
paths:
|
||||||
- "web/**"
|
- "*.json"
|
||||||
|
- "*.ts"
|
||||||
|
- "*.tsx"
|
||||||
|
- "*.js"
|
||||||
|
- "*.jsx"
|
||||||
|
- "*.html"
|
||||||
- ".github/workflows/web-ci.yml"
|
- ".github/workflows/web-ci.yml"
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: web-ci-${{ github.ref }}
|
group: web-ci-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: web
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
name: Type Check
|
name: Type Check
|
||||||
@@ -33,7 +39,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: npm
|
cache: npm
|
||||||
cache-dependency-path: web/package-lock.json
|
cache-dependency-path: package-lock.json
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
@@ -54,7 +60,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: npm
|
cache: npm
|
||||||
cache-dependency-path: web/package-lock.json
|
cache-dependency-path: package-lock.json
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
@@ -75,7 +81,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: npm
|
cache: npm
|
||||||
cache-dependency-path: web/package-lock.json
|
cache-dependency-path: package-lock.json
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
@@ -93,10 +99,9 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Deploy to Vercel
|
- name: Deploy to Vercel
|
||||||
uses: amondnet/vercel-action@v25
|
uses: amondnet/vercel-action@v30
|
||||||
with:
|
with:
|
||||||
vercel-token: ${{ secrets.VERCEL_TOKEN }}
|
vercel-token: ${{ secrets.VERCEL_TOKEN }}
|
||||||
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
|
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
|
||||||
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
|
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
|
||||||
vercel-args: --prod
|
vercel-args: --prod
|
||||||
working-directory: web
|
|
||||||
|
|||||||
19
package.json
Normal file
19
package.json
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "lendair-web",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "tsc && vite build",
|
||||||
|
"preview": "vite preview",
|
||||||
|
"test": "vitest run",
|
||||||
|
"test:watch": "vitest",
|
||||||
|
"typecheck": "tsc --noEmit"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"typescript": "^5.4.0",
|
||||||
|
"vite": "^5.2.0",
|
||||||
|
"vitest": "^1.4.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
src/index.ts
Normal file
1
src/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export const APP_NAME = 'Lendair';
|
||||||
18
tsconfig.json
Normal file
18
tsconfig.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2020",
|
||||||
|
"module": "ESNext",
|
||||||
|
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"allowImportingTsExtensions": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"moduleDetection": "force",
|
||||||
|
"noEmit": true,
|
||||||
|
"strict": true,
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true,
|
||||||
|
"noFallthroughCasesInSwitch": true
|
||||||
|
},
|
||||||
|
"include": ["src/**/*.ts", "src/**/*.tsx"]
|
||||||
|
}
|
||||||
7
vite.config.ts
Normal file
7
vite.config.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
outDir: 'dist',
|
||||||
|
},
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user