Signage had no CI. Its tests passed while three defects shipped that appear only inside Ekklesia, in a real browser. Every job now assembles Signage into a pinned platform commit, as an instance does, and installs that workspace with --frozen-lockfile: - lint, typecheck, test: Signage's own checks; - build: the platform's gates against exactly this module set (boundary rules, module manifest, migrations), then the build; - integration: the deployment image from the platform's Dockerfile, then the platform's split-topology smoke. It pairs a kiosk display, restarts it on the same profile, and runs the scenarios in ci/display-scenarios. The supporting files: - ci/platform.env pins one platform commit. ci/assemble.sh fetches the platform's main and refuses a pinned commit that is not on it, so CI only runs reviewed platform code. - ci/pnpm-lock.yaml is the assembled workspace's lockfile, regenerated with ci/update-lock.sh. Same trust rules as the platform: actions pinned by SHA, persist-credentials false, no secrets, no pull_request_target. Co-Authored-By: Claude Opus 5.5 <[email protected]>
198 lines
7.0 KiB
YAML
198 lines
7.0 KiB
YAML
name: CI
|
|
|
|
# Signage builds, tests, and runs only inside an Ekklesia workspace, so every job first assembles it
|
|
# into the platform commit pinned in ci/platform.env (ci/assemble.sh) and installs that workspace
|
|
# with --frozen-lockfile from ci/pnpm-lock.yaml.
|
|
#
|
|
# The same trust rules as the platform's own CI (docs/development/security.md there):
|
|
# * every action is pinned by a full commit SHA;
|
|
# * every checkout sets `persist-credentials: false`, and nothing in this workflow pushes;
|
|
# * no repository, organization, or instance secret is referenced;
|
|
# * there is no `pull_request_target`;
|
|
# * the self-hosted runner executes trusted, reviewed code only.
|
|
#
|
|
# The server is Gitea 1.24, which ignores `permissions`, `concurrency`, and `timeout-minutes`
|
|
# (https://docs.gitea.com/1.24/usage/actions/comparison). They are declared so the workflow is already
|
|
# correct on a release that honours them; on 1.24 they bound nothing, and `permissions` does not
|
|
# restrict the job token.
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
name: lint
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
# Nothing here pushes, so the job token is never needed after checkout and must not be left
|
|
# in .git/config for a later step to read.
|
|
persist-credentials: false
|
|
|
|
- name: Assemble Signage into the pinned platform
|
|
run: bash ci/assemble.sh
|
|
|
|
- name: Set up Node.js at the platform's version
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version-file: build/workspace/.node-version
|
|
|
|
- name: Install the assembled workspace (frozen lockfile)
|
|
working-directory: build/workspace
|
|
run: |
|
|
corepack enable
|
|
corepack install
|
|
pnpm install --frozen-lockfile
|
|
|
|
- name: Lint
|
|
working-directory: build/workspace
|
|
run: pnpm --filter @ekklesia/signage lint
|
|
|
|
typecheck:
|
|
name: typecheck
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
# Nothing here pushes, so the job token is never needed after checkout and must not be left
|
|
# in .git/config for a later step to read.
|
|
persist-credentials: false
|
|
|
|
- name: Assemble Signage into the pinned platform
|
|
run: bash ci/assemble.sh
|
|
|
|
- name: Set up Node.js at the platform's version
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version-file: build/workspace/.node-version
|
|
|
|
- name: Install the assembled workspace (frozen lockfile)
|
|
working-directory: build/workspace
|
|
run: |
|
|
corepack enable
|
|
corepack install
|
|
pnpm install --frozen-lockfile
|
|
|
|
- name: Build the platform packages Signage depends on
|
|
working-directory: build/workspace
|
|
run: pnpm exec turbo run build --filter='@ekklesia/signage^...'
|
|
|
|
- name: Typecheck the server, browser, and browser-test projects
|
|
working-directory: build/workspace
|
|
run: pnpm --filter @ekklesia/signage typecheck
|
|
|
|
test:
|
|
name: test
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
# Nothing here pushes, so the job token is never needed after checkout and must not be left
|
|
# in .git/config for a later step to read.
|
|
persist-credentials: false
|
|
|
|
- name: Assemble Signage into the pinned platform
|
|
run: bash ci/assemble.sh
|
|
|
|
- name: Set up Node.js at the platform's version
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version-file: build/workspace/.node-version
|
|
|
|
- name: Install the assembled workspace (frozen lockfile)
|
|
working-directory: build/workspace
|
|
run: |
|
|
corepack enable
|
|
corepack install
|
|
pnpm install --frozen-lockfile
|
|
|
|
- name: Build the platform packages Signage depends on
|
|
working-directory: build/workspace
|
|
run: pnpm exec turbo run build --filter='@ekklesia/signage^...'
|
|
|
|
- name: Unit, browser, and display contract tests
|
|
working-directory: build/workspace
|
|
run: pnpm --filter @ekklesia/signage test
|
|
|
|
build:
|
|
name: build
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
# Nothing here pushes, so the job token is never needed after checkout and must not be left
|
|
# in .git/config for a later step to read.
|
|
persist-credentials: false
|
|
|
|
- name: Assemble Signage into the pinned platform
|
|
run: bash ci/assemble.sh
|
|
|
|
- name: Set up Node.js at the platform's version
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version-file: build/workspace/.node-version
|
|
|
|
- name: Install the assembled workspace (frozen lockfile)
|
|
working-directory: build/workspace
|
|
run: |
|
|
corepack enable
|
|
corepack install
|
|
pnpm install --frozen-lockfile
|
|
|
|
# The same gates the platform's image build runs against exactly this module set: its boundary
|
|
# rules (which apply to modules), the manifest, and the migrations.
|
|
- name: Platform gates (boundaries, module manifest, migrations)
|
|
working-directory: build/workspace
|
|
run: |
|
|
pnpm boundaries
|
|
pnpm modules:validate
|
|
pnpm migrations:validate
|
|
|
|
- name: Build Signage and the platform it depends on
|
|
working-directory: build/workspace
|
|
run: pnpm exec turbo run build --filter='@ekklesia/signage...'
|
|
|
|
# Signage inside Ekklesia, end to end, in a real browser: the platform's own Dockerfile builds the
|
|
# deployment image with Signage in it, and the platform's split-topology deployment smoke runs
|
|
# against it, pairing a kiosk display and running the scenarios in ci/display-scenarios. A
|
|
# disposable database and object store with generated secrets; nothing is pushed or logged in to.
|
|
integration:
|
|
name: integration
|
|
needs:
|
|
- test
|
|
- build
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
env:
|
|
DOCKER_BUILDKIT: "1"
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Assemble Signage into the pinned platform
|
|
run: bash ci/assemble.sh
|
|
|
|
- name: Build the image and run the display scenarios
|
|
run: bash ci/integration.sh
|