66 lines
1.6 KiB
YAML
66 lines
1.6 KiB
YAML
# Peregrine CI — runs on GitHub mirror for public credibility badge.
|
|
# Forgejo (.forgejo/workflows/ci.yml) is the canonical CI — keep these in sync.
|
|
# No Forgejo-specific secrets used here; circuitforge-core is public on Forgejo.
|
|
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
backend:
|
|
name: Backend (Python)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
cache: pip
|
|
|
|
- name: Install system dependencies
|
|
run: sudo apt-get install -y libsqlcipher-dev
|
|
|
|
- name: Install circuitforge-core
|
|
run: pip install git+https://git.opensourcesolarpunk.com/Circuit-Forge/circuitforge-core.git@main
|
|
|
|
- name: Install dependencies
|
|
run: pip install -r requirements.txt ruff pytest
|
|
|
|
- name: Lint
|
|
run: ruff check .
|
|
|
|
- name: Test
|
|
env:
|
|
STAGING_DB: /tmp/peregrine-ci.db
|
|
CLOUD_DATA_ROOT: /tmp/peregrine-ci-cloud
|
|
PEREGRINE_LOG_DIR: /tmp/peregrine-ci-logs
|
|
run: pytest tests/ -v --tb=short
|
|
|
|
frontend:
|
|
name: Frontend (Vue)
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: web
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: npm
|
|
cache-dependency-path: web/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Type check
|
|
run: npx vue-tsc --noEmit
|
|
|
|
- name: Test
|
|
run: npm run test
|