ci / check (push) Successful in 15m57s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
92 lines
3.2 KiB
YAML
92 lines
3.2 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags-ignore: ["**"]
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "41 5 * * *" # nightly: dependency audit + full test run
|
|
|
|
# One job on purpose: the shared runner pool is small, so everything runs
|
|
# sequentially on a single runner instead of a matrix.
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 90
|
|
env:
|
|
CI: "true"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
|
|
- name: install pnpm
|
|
run: |
|
|
npm install -g pnpm@10.33.3
|
|
pnpm --version
|
|
|
|
- name: install dependencies
|
|
# Lifecycle scripts are skipped: the desktop postinstall compiles
|
|
# electron-app native modules, which the admin build and ember tests
|
|
# do not need.
|
|
run: pnpm install --frozen-lockfile --ignore-scripts
|
|
|
|
- name: install headless chrome
|
|
# Debian/Ubuntu chromium from the distro archive (fast, mirrored),
|
|
# exposed under the name testem's "Chrome" launcher looks for.
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
if ! command -v google-chrome >/dev/null 2>&1; then
|
|
SUDO=""; [ "$(id -u)" -ne 0 ] && SUDO="sudo"
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
$SUDO apt-get update -qq
|
|
$SUDO apt-get install -y -qq --no-install-recommends chromium \
|
|
|| $SUDO apt-get install -y -qq --no-install-recommends chromium-browser
|
|
CHROME_BIN=$(command -v chromium || command -v chromium-browser)
|
|
mkdir -p "$HOME/bin"
|
|
ln -sf "$CHROME_BIN" "$HOME/bin/google-chrome"
|
|
echo "$HOME/bin" >> "$GITHUB_PATH"
|
|
fi
|
|
PATH="$HOME/bin:$PATH" google-chrome --version
|
|
|
|
- name: build admin ui
|
|
run: pnpm --filter admin build
|
|
|
|
- name: test addons
|
|
run: |
|
|
for a in core auth rose; do
|
|
echo "::group::addons/$a"
|
|
(cd addons/$a && npx ember test --test-port 0)
|
|
echo "::endgroup::"
|
|
done
|
|
echo "::group::addons/api"
|
|
(cd addons/api && npx ember exam --test-port 0 --split=4 --parallel=1)
|
|
echo "::endgroup::"
|
|
|
|
- name: test desktop ui
|
|
run: cd ui/desktop && npx ember test --test-port 0
|
|
|
|
- name: test admin ui
|
|
# The test build is made once and the partitions then run against the
|
|
# static output, one browser at a time. Rebuilding in-process (and four
|
|
# concurrent browsers) stalled on the small shared runners.
|
|
run: |
|
|
cd ui/admin
|
|
npx ember build --environment=test --output-path="$RUNNER_TEMP/admin-test-dist"
|
|
for p in 1 2 3 4; do
|
|
echo "::group::admin partition $p/4"
|
|
timeout 25m npx ember exam --test-port 0 --path "$RUNNER_TEMP/admin-test-dist" --split=4 --partition=$p
|
|
echo "::endgroup::"
|
|
done
|
|
|
|
- name: dependency audit
|
|
# Fails on critical advisories only; remaining high/moderate advisories
|
|
# are build/test tooling and are tracked in pnpm-overrides.md.
|
|
run: |
|
|
pnpm audit --audit-level=critical
|
|
(cd ui/desktop/electron-app && pnpm audit --audit-level=critical)
|