fix(ci): align EAS workflow expo-doctor with main CI tolerance #133
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: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x] | |
| steps: | |
| - name: π Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: π Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| # Lockfile is generated with npm 10; default npm on Node 18/20 rejects it under npm 11 rules. | |
| - name: Use npm 10 for npm ci | |
| run: npm install -g npm@10.9.2 | |
| - name: π¦ Install dependencies | |
| run: npm ci | |
| - name: π Lint code | |
| run: npx eslint src/ --ext .js,.jsx,.ts,.tsx --max-warnings 0 || echo "ESLint not configured, skipping..." | |
| - name: π Check for security vulnerabilities | |
| run: npm audit --audit-level=high | |
| continue-on-error: true | |
| - name: π©Ί Run Expo Doctor (Node 20) | |
| if: matrix.node-version == '20.x' | |
| run: | | |
| npm run doctor 2>&1 | tee doctor_output.txt || true | |
| if grep -q "No issues detected" doctor_output.txt; then | |
| echo "β All expo-doctor checks passed" | |
| exit 0 | |
| elif grep -q 'The package "expo-modules-core" should not be installed directly' doctor_output.txt && ! grep -q "Missing peer dependency: expo-modules-core" doctor_output.txt; then | |
| echo "β οΈ Known warning: expo-modules-core is required by @clerk/expo (peer dependency)" | |
| echo "β All other expo-doctor checks passed" | |
| exit 0 | |
| else | |
| echo "β Some expo-doctor checks failed" | |
| cat doctor_output.txt | |
| exit 1 | |
| fi | |
| - name: π©Ί Run Expo Doctor (Node 18 compatibility check) | |
| if: matrix.node-version == '18.x' | |
| run: npm run doctor || echo "expo-doctor failed on Node 18; ensure Node 20 or apply compatibility polyfill" | |
| - name: π¦ Test JavaScript bundle creation | |
| run: npm run export:dev |