Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ name: Tests
# Runs ./test/all on a real Omarchy install: the VM image of the current
# release, booted fresh for each shard, with this checkout's code copied in.
# The package recipes are checked out beside it, because some tests hold this
# repository's scripts against them. Same-repo branches and pushes to quattro
# run on Namespace 16x32 runners (inline, avoiding a separate trust job); fork
# pull requests run the same sharded suite on GitHub's ubuntu-26.04 runners.
# repository's scripts against them. This fork has no Namespace runners, so
# every shard runs on GitHub's ubuntu-26.04 runners. The release image is
# reused from a Namespace cache volume when NSC_CACHE_PATH is set, and
# fetched into /dev/shm otherwise.

on:
pull_request:
Expand All @@ -22,7 +23,7 @@ concurrency:
jobs:
test:
name: test (${{ matrix.shard }})
runs-on: ${{ (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && 'namespace-profile-linux-amd64-16x32' || 'ubuntu-26.04' }}
runs-on: ubuntu-26.04
timeout-minutes: 20
strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ the end and exits non-zero.
Deliberately excluded from `./test/all`; it runs in a VM, not the
development session.

Every pull request runs `./test/all` on a real Omarchy install (`.github/workflows/test.yml`), sharded across four parallel VMs (`noncomp-1`, `noncomp-2`, `comp` with `test/cli`, and `exclusive`): `test/ci-vm` boots the VM image of the current stable release using a prebuilt Arch QEMU container (`ghcr.io/omacom/omarchy-ci-qemu:latest`, refreshed by `.github/workflows/ci-qemu-image.yml`), copies the checkout and omarchy-pkgs in, and runs its shard in the desktop session with `OMARCHY_PATH` at the checkout and its `bin/` first on `PATH`. Same-repo branches and pushes to `quattro` run on Namespace `16x32` runners with the release VM image cached in `$NSC_CACHE_PATH`; fork pull requests run the same four shards on GitHub's `ubuntu-26.04` runners, fetching the image into `/dev/shm`. When a run fails, the job log shows the output of every test file that failed or did not finish, and the job uploads every file's log as an artifact. `./test/shell` also prints the ten slowest test files in each run (`--group all|noncomp|comp|exclusive` and `--shard K/N` select subsets locally the same way CI does).
Every pull request runs `./test/all` on a real Omarchy install (`.github/workflows/test.yml`), sharded across four parallel VMs (`noncomp-1`, `noncomp-2`, `comp` with `test/cli`, and `exclusive`): `test/ci-vm` boots the VM image of the current stable release using a prebuilt Arch QEMU container (`ghcr.io/omacom/omarchy-ci-qemu:latest`, refreshed by `.github/workflows/ci-qemu-image.yml`), copies the checkout and omarchy-pkgs in, and runs its shard in the desktop session with `OMARCHY_PATH` at the checkout and its `bin/` first on `PATH`. Every shard runs on GitHub's `ubuntu-26.04` runners. The release image is reused from a Namespace cache volume when `$NSC_CACHE_PATH` is set, and fetched into `/dev/shm` otherwise. When a run fails, the job log shows the output of every test file that failed or did not finish, and the job uploads every file's log as an artifact. `./test/shell` also prints the ten slowest test files in each run (`--group all|noncomp|comp|exclusive` and `--shard K/N` select subsets locally the same way CI does).

A new shell test only needs the right name: drop `<area>-test.sh` into
`test/shell.d/` and `./test/shell` picks it up automatically. Shared fixtures
Expand Down
3 changes: 2 additions & 1 deletion test/shell.d/polkit-face-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@ const pluginQml = fs.readdirSync(pluginDir).filter((name) => name.endsWith('.qml

assert(/property var pluginRegistry/.test(agentQml), 'polkit agent declares pluginRegistry so ensureService injects the real registry')
assert(!/property\s+\S+\s+shell\b/.test(pluginQml), 'nothing in the polkit plugin declares shell')
assert(!/\bsource:/.test(pluginQml) && !/setSource\(/.test(pluginQml) && !/FaceScanRing/.test(pluginQml), 'no QML is loaded from a URL into the polkit windows')
const qmlWithoutImages = pluginQml.replace(/\bImage\s*\{[^}]*\}/g, '')
assert(!/\bsource:/.test(qmlWithoutImages) && !/setSource\(/.test(pluginQml) && !/FaceScanRing/.test(pluginQml), 'no QML is loaded from a URL into the polkit windows')
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
assert(!fs.existsSync(path.join(pluginDir, 'FaceScanRing.qml')), 'first-party FaceScanRing is gone')
assert(!/chromeContext/.test(pluginQml), 'chromeContext is gone: a QtObject parented to the agent root is a walk back to the field')
assert(!/item\.chrome/.test(pluginQml) && !/item\.flow/.test(pluginQml), 'nothing host-owned is handed to a chrome plugin')
Expand Down
Loading