Files
peardata/.github/workflows/ci.yml
T
2026-07-18 16:22:56 -04:00

84 lines
2.2 KiB
YAML

name: CI
on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
NODE_OPTIONS: '--dns-result-order=ipv4first'
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
node: ['20', '22']
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: |
set -euo pipefail
git config --global url."https://github.com/".insteadOf "ssh://[email protected]/"
git config --global url."https://github.com/".insteadOf "[email protected]:"
npm install --no-audit --no-fund
- name: Unit tests
run: npm test
env:
# Integration may hang without UDP; unit suite still runs
SKIP_INTEGRATION: '0'
- name: Syntax check entrypoints
run: |
node --check server/server.js
node --check client/connection.js
node --check app.js
node --check shared/crypto-auth.js
lint-docs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Required docs present
run: |
set -euo pipefail
for f in \
README.md \
LICENSE \
docs/ARCHITECTURE.md \
docs/PROTOCOL.md \
docs/DATA-MODEL.md \
docs/REST-API.md \
docs/ROADMAP.md \
docs/TECH-CHOICES.md \
docs/STORAGE-HYPERDB.md \
docs/GETTING-STARTED.md \
docs/SECURITY.md \
docs/DESKTOP.md \
docs/CONFIGURATION.md \
docs/TESTING.md \
docs/CI.md \
docs/RELEASE.md \
docs/EXTENDING.md \
.env.example
do
test -f "$f" || { echo "missing $f"; exit 1; }
done
# Desktop chrome must stay documented in the HTML shell
grep -q 'pear-ctrl' index.html
grep -q 'webkit-app-region: drag' ui/styles.css