Files
context-extractor/.gitea/workflows/ci.yml
T
ilia d26d1aaa4e
CI / automation-js (vitest + real Chromium) (pull_request) Successful in 1m15s
CI / Lint + tests (pull_request) Successful in 10m42s
Unify product version at 1.4.0, add ruff gate, drop stale GitHub workflow
- One version (1.4.0) across extension/manifest.json, automation/pyproject.toml,
  automation-js/package.json (+lockfile); README documents the bump-together policy
- Delete .github/workflows/ci.yml (behind the Gitea copy; CI runs on Gitea Actions)
- CURSOR_PROMPT.md: replace personal paths with <path-to-context-extractor>
- Add ruff (E4,E7,E9,F,I, line-length 120) to automation/ dev extras, Makefile lint,
  and the Gitea CI Lint + tests job as a hard gate
2026-07-26 15:47:37 -04:00

114 lines
3.0 KiB
YAML

name: CI
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
jobs:
quality:
name: Lint + tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: automation
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: automation/pyproject.toml
- name: Set up Node (JS syntax check only)
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Syntax-check extension JS
working-directory: ${{ github.workspace }}
run: |
set -euo pipefail
for f in \
extension/core/dom.js \
extension/core/prompt.js \
extension/page-patcher.js \
extension/content.js \
extension/background.js \
extension/popup.js
do
node --check "$f"
echo "OK $f"
done
python3 -m json.tool extension/manifest.json >/dev/null
echo "OK extension/manifest.json"
- name: Verify shared-core symlinks
working-directory: ${{ github.workspace }}
run: |
set -euo pipefail
test -L automation/context_extractor/js/dom.js
test -L automation/context_extractor/js/prompt.js
diff -q automation/context_extractor/js/dom.js extension/core/dom.js
diff -q automation/context_extractor/js/prompt.js extension/core/prompt.js
test -L automation-js/src/js/dom.js
test -L automation-js/src/js/prompt.js
diff -q automation-js/src/js/dom.js extension/core/dom.js
diff -q automation-js/src/js/prompt.js extension/core/prompt.js
- name: Install package + dev deps
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Ruff lint
run: ruff check .
- name: Install Playwright Chromium
run: playwright install --with-deps chromium
- name: Pytest
run: pytest -q
- name: Package extension zip (smoke)
working-directory: ${{ github.workspace }}
run: |
python3 scripts/package_extension.py
test -f dist/context-extractor-extension.zip
quality-js:
name: automation-js (vitest + real Chromium)
runs-on: ubuntu-latest
defaults:
run:
working-directory: automation-js
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install deps
run: npm install
- name: Install Playwright Chromium
run: npx playwright install --with-deps chromium
- name: Typecheck
run: npm run typecheck
- name: Vitest
run: npm test
- name: Build (verifies dist/js copy step)
run: npm run build