- WXT + React 18 + TypeScript setup - Background service worker (LLM API proxy) - Content script (floating toolbar + text selection) - Options page (provider/model/API key config) - Popup UI - Gitea Actions workflows (CI, preview, release) - Vitest unit tests + Playwright E2E setup - Supports: OpenAI, Anthropic, Groq, OpenRouter
53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
name: Preview — PR Build Check
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
preview-build:
|
|
name: PR Preview Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Type check
|
|
run: npm run typecheck
|
|
|
|
- name: Run unit tests
|
|
run: npm test
|
|
|
|
- name: Build extension
|
|
run: npm run build
|
|
|
|
- name: Package preview ZIP
|
|
run: npm run zip
|
|
|
|
- name: Upload PR artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: lexai-pr-${{ github.event.pull_request.number }}-preview
|
|
path: .output/lexai-*.zip
|
|
retention-days: 3
|
|
|
|
- name: Comment on PR
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
github.rest.issues.createComment({
|
|
issue_number: context.issue.number,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
body: `## ⚡ LexAI Preview Build Ready\n\n✅ Tests passed\n✅ Build successful\n\n📦 Download the extension ZIP from the **Artifacts** section above to test this PR.\n\nCommit: \`${{ github.sha }}\``
|
|
})
|