mirror of
https://github.com/mengxi-ream/read-frog.git
synced 2026-04-30 01:56:46 +00:00
57 lines
1.3 KiB
YAML
57 lines
1.3 KiB
YAML
name: PR - Test & Build
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
WXT_SKIP_ENV_VALIDATION: true
|
|
|
|
jobs:
|
|
test-and-build:
|
|
name: Test & Build
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
|
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
|
|
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v5
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "24"
|
|
cache: pnpm
|
|
|
|
- name: Install Dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
shell: bash
|
|
|
|
- name: Check for eruda imports
|
|
run: |
|
|
if grep -r "import.*eruda" src/ --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" | grep -v ":.*[[:space:]]*//.*import.*eruda"; then
|
|
echo "❌ Found uncommented eruda imports in the codebase!"
|
|
echo "Please comment out or remove eruda imports before merging."
|
|
exit 1
|
|
else
|
|
echo "✅ No uncommented eruda imports found."
|
|
fi
|
|
shell: bash
|
|
|
|
- name: ESLint
|
|
run: pnpm lint
|
|
|
|
- name: Type check
|
|
run: pnpm type-check
|
|
|
|
- name: Build
|
|
run: pnpm build
|
|
|
|
- name: Run tests
|
|
run: pnpm test --exclude="**/free-api.test.ts"
|