- ci-ts restores the local turbo cache, so unchanged packages skip typecheck, test and build - ci-mobile caches the npx copy of expo-doctor and Metro's transform cache - the web image copies only workspace manifests before pnpm install, so the dependency layer survives code changes (CI docker job and update.sh) - docs: table of what is cached where Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
# Expo: expo-doctor и Metro-бандл Android (docs/ci-cd.md). Полная сборка APK — только в release.yml.
|
|
name: ci / mobile
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'apps/mobile/**'
|
|
- 'packages/**'
|
|
- 'package.json'
|
|
- 'pnpm-lock.yaml'
|
|
- 'pnpm-workspace.yaml'
|
|
- 'turbo.json'
|
|
- 'tsconfig.base.json'
|
|
- '.gitea/workflows/ci-mobile.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'apps/mobile/**'
|
|
- 'packages/**'
|
|
- 'package.json'
|
|
- 'pnpm-lock.yaml'
|
|
- 'pnpm-workspace.yaml'
|
|
- 'turbo.json'
|
|
- 'tsconfig.base.json'
|
|
- '.gitea/workflows/ci-mobile.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
mobile:
|
|
name: mobile (Metro-бандл Android)
|
|
runs-on: ubuntu-latest
|
|
defaults: { run: { working-directory: apps/mobile } }
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: pnpm/action-setup@v4
|
|
- uses: actions/setup-node@v4
|
|
with: { node-version: "22", cache: pnpm }
|
|
- run: pnpm install --frozen-lockfile
|
|
# npx expo-doctor качает пакет в кэш npm; Metro хранит трансформации в /tmp/metro-cache
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.npm/_npx
|
|
/tmp/metro-cache
|
|
key: mobile-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.sha }}
|
|
restore-keys: mobile-${{ hashFiles('pnpm-lock.yaml') }}-
|
|
- run: npx expo-doctor
|
|
- run: npx expo export --platform android --output-dir dist
|