Merge pull request #35 from ankhorage/fix/eslint-9-react-native-compat #131
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: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: '1.3.13' | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Run build | |
| run: | | |
| if node -e "const p=require('./package.json'); process.exit(p.scripts?.build ? 0 : 1)"; then | |
| bun run build | |
| else | |
| echo "No build script found; skipping." | |
| fi | |
| - name: Validate Ankhorage repository | |
| run: bunx @ankhorage/ankh doctor validate . | |
| - name: Run lint | |
| run: | | |
| if node -e "const p=require('./package.json'); process.exit(p.scripts?.lint ? 0 : 1)"; then | |
| bun run lint | |
| else | |
| echo "No lint script found; skipping." | |
| fi | |
| - name: Run format check | |
| run: | | |
| if node -e "const p=require('./package.json'); process.exit(p.scripts?.['format:check'] ? 0 : 1)"; then | |
| bun run format:check | |
| else | |
| echo "No format:check script found; skipping." | |
| fi | |
| - name: Run Knip | |
| run: | | |
| if node -e "const p=require('./package.json'); process.exit(p.scripts?.knip ? 0 : 1)"; then | |
| bun run knip | |
| else | |
| echo "No knip script found; skipping." | |
| fi | |
| - name: Run tests | |
| run: | | |
| if node -e "const p=require('./package.json'); process.exit(p.scripts?.test ? 0 : 1)"; then | |
| bun run test | |
| else | |
| echo "No test script found; skipping." | |
| fi | |
| - name: Run typecheck | |
| run: | | |
| if node -e "const p=require('./package.json'); process.exit(p.scripts?.typecheck ? 0 : 1)"; then | |
| bun run typecheck | |
| else | |
| echo "No typecheck script found; skipping." | |
| fi | |
| - name: Check changesets | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| if node -e "const p=require('./package.json'); process.exit(p.scripts?.['changeset:status'] ? 0 : 1)"; then | |
| bun run changeset:status | |
| else | |
| echo "No changeset:status script found; skipping." | |
| fi |