- Dockerfile with multi-stage build (Node 22 Alpine, sodium-native) - docker-compose.yml with health check for easy self-hosting - README with setup guide, API reference, and project overview - Architecture docs (data flow, component breakdown, protocol constants) - Security model docs (threat model, crypto primitives, self-hosting checklist) - GitHub Actions CI pipeline (test, typecheck, Docker smoke test, extension builds) - GitHub Actions release pipeline (GHCR push, extension zip artifacts) - CONTRIBUTING.md with dev setup and code style guidelines Co-Authored-By: Paperclip <noreply@paperclip.ing>
65 lines
1.4 KiB
YAML
65 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [22]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: npm
|
|
|
|
- run: npm ci
|
|
- run: npm run typecheck
|
|
- run: npm test
|
|
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build Docker image
|
|
run: docker build -t cookiebridge:ci .
|
|
|
|
- name: Smoke test
|
|
run: |
|
|
docker run -d --name cb-test -p 8080:8080 cookiebridge:ci
|
|
sleep 3
|
|
curl -sf http://localhost:8080/health
|
|
docker stop cb-test
|
|
|
|
extension:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
cache-dependency-path: extension/package-lock.json
|
|
|
|
- name: Install extension dependencies
|
|
working-directory: extension
|
|
run: npm ci
|
|
|
|
- name: Build all browsers
|
|
working-directory: extension
|
|
run: |
|
|
node esbuild.config.mjs --browser=chrome
|
|
node esbuild.config.mjs --browser=firefox
|
|
node esbuild.config.mjs --browser=edge
|
|
node esbuild.config.mjs --browser=safari
|