fix/readme #103
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| concurrency: | |
| group: frontend-ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Jest on Node ${{ matrix.node }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: [18, 20, 22] | |
| env: | |
| CI: "1" | |
| EXPO_TUNNEL: "false" | |
| EXPO_DEVTOOLS_LISTEN_ADDRESS: 0.0.0.0 | |
| EXPO_PUBLIC_API_BASE: http://localhost:8000 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Use Node ${{ matrix.node }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| cache-dependency-path: frontend/app/package-lock.json | |
| - name: Install deps | |
| working-directory: frontend/app | |
| run: npm ci | |
| - name: Type check (skip if no TS) | |
| if: hashFiles('frontend/app/tsconfig.json') != '' | |
| working-directory: frontend/app | |
| run: | | |
| npx --yes typescript@latest -v >/dev/null 2>&1 || true | |
| npx tsc --noEmit || (echo "::warning::Type check failed"; exit 1) | |
| - name: Run Jest with coverage (CI mode) | |
| working-directory: frontend/app | |
| run: npm test -- --ci --runInBand --coverage --verbose | |
| - name: Upload coverage | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-node${{ matrix.node }} | |
| path: frontend/app/coverage | |
| if-no-files-found: warn | |
| web-export-smoke: | |
| name: Expo web export (smoke) | |
| needs: test | |
| runs-on: ubuntu-latest | |
| env: | |
| CI: "1" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Use Node 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: frontend/app/package-lock.json | |
| - name: Install deps | |
| working-directory: frontend/app | |
| run: npm ci | |
| - name: Build (expo export -p web) | |
| working-directory: frontend/app | |
| run: npx expo export -p web | |
| - name: Upload dist (preview artifact) | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: expo-web-dist | |
| path: frontend/app/dist | |
| if-no-files-found: error |