Skip to content

feat: introduce plugin system for runtime extensibility #29

feat: introduce plugin system for runtime extensibility

feat: introduce plugin system for runtime extensibility #29

Workflow file for this run

# CI workflow for pixel-agents
name: CI
on:
pull_request:
paths-ignore:
- '**.md'
- 'LICENSE'
- '.github/FUNDING.yml'
push:
branches:
- main
paths-ignore:
- '**.md'
- 'LICENSE'
- '.github/FUNDING.yml'
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
ci:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Node
id: setup_node
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: |
package-lock.json
webview-ui/package-lock.json
- name: Install Root Dependencies
id: install_root
run: npm ci
- name: Install Webview Dependencies
id: install_webview
working-directory: webview-ui
run: npm ci
# --- Quality Checks (blocking) ---
- name: Type Check
id: type_check
if: always() && steps.install_root.outcome == 'success'
run: npm run check-types
continue-on-error: true
- name: Root Lint
id: root_lint
if: always() && steps.install_root.outcome == 'success'
run: npm run lint
continue-on-error: true
- name: Webview Lint
id: webview_lint
if: always() && steps.install_webview.outcome == 'success'
working-directory: webview-ui
run: npm run lint
continue-on-error: true
- name: Format Check
id: format_check
if: always() && steps.install_root.outcome == 'success'
run: npm run format:check
continue-on-error: true
# --- Build (blocking) ---
- name: Build
id: build
if: always() && steps.install_root.outcome == 'success' && steps.install_webview.outcome == 'success'
run: |
node esbuild.js
cd webview-ui && npm run build
continue-on-error: true
# --- Advisory Checks (non-blocking) ---
- name: Audit Root Dependencies
id: audit_root
if: always() && steps.install_root.outcome == 'success'
run: npm audit --audit-level=high
continue-on-error: true
- name: Audit Webview Dependencies
id: audit_webview
if: always() && steps.install_webview.outcome == 'success'
working-directory: webview-ui
run: npm audit --audit-level=high
continue-on-error: true
# --- Summary ---
- name: Write Step Summary
if: always()
env:
CHECKOUT: ${{ steps.checkout.outcome }}
SETUP_NODE: ${{ steps.setup_node.outcome }}
INSTALL_ROOT: ${{ steps.install_root.outcome }}
INSTALL_WEBVIEW: ${{ steps.install_webview.outcome }}
TYPE_CHECK: ${{ steps.type_check.outcome }}
ROOT_LINT: ${{ steps.root_lint.outcome }}
WEBVIEW_LINT: ${{ steps.webview_lint.outcome }}
FORMAT_CHECK: ${{ steps.format_check.outcome }}
BUILD: ${{ steps.build.outcome }}
AUDIT_ROOT: ${{ steps.audit_root.outcome }}
AUDIT_WEBVIEW: ${{ steps.audit_webview.outcome }}
run: |
status() {
if [ "$1" = "success" ]; then echo "✅ PASS"; else echo "❌ FAIL"; fi
}
{
echo "## CI Results"
echo
echo "| Check | Result |"
echo "| --- | --- |"
echo "| Checkout | $(status "$CHECKOUT") |"
echo "| Setup Node | $(status "$SETUP_NODE") |"
echo "| Install root deps | $(status "$INSTALL_ROOT") |"
echo "| Install webview deps | $(status "$INSTALL_WEBVIEW") |"
echo "| **Type check** | $(status "$TYPE_CHECK") |"
echo "| **Root lint** | $(status "$ROOT_LINT") |"
echo "| **Webview lint** | $(status "$WEBVIEW_LINT") |"
echo "| **Format check** | $(status "$FORMAT_CHECK") |"
echo "| **Build** | $(status "$BUILD") |"
echo "| Audit root _(advisory)_ | $(status "$AUDIT_ROOT") |"
echo "| Audit webview _(advisory)_ | $(status "$AUDIT_WEBVIEW") |"
} >> "$GITHUB_STEP_SUMMARY"
# --- Final Gate ---
- name: Fail If Any Blocking Check Failed
if: always()
env:
CHECKOUT: ${{ steps.checkout.outcome }}
SETUP_NODE: ${{ steps.setup_node.outcome }}
INSTALL_ROOT: ${{ steps.install_root.outcome }}
INSTALL_WEBVIEW: ${{ steps.install_webview.outcome }}
TYPE_CHECK: ${{ steps.type_check.outcome }}
ROOT_LINT: ${{ steps.root_lint.outcome }}
WEBVIEW_LINT: ${{ steps.webview_lint.outcome }}
FORMAT_CHECK: ${{ steps.format_check.outcome }}
BUILD: ${{ steps.build.outcome }}
run: |
failed=0
for step in CHECKOUT SETUP_NODE INSTALL_ROOT INSTALL_WEBVIEW \
TYPE_CHECK ROOT_LINT WEBVIEW_LINT FORMAT_CHECK \
BUILD; do
eval "val=\$$step"
if [ "$val" != "success" ]; then
echo "::error::$step failed"
failed=1
fi
done
exit "$failed"