Skip to content

Say when nothing answers at the AI model's address #5727

Say when nothing answers at the AI model's address

Say when nothing answers at the AI model's address #5727

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
# Callable, so publishing a release runs these same checks against the release commit rather than
# trusting that they ran somewhere earlier.
workflow_call:
# Least privilege by default. Jobs that need more must declare it locally.
permissions:
contents: read
# The newest push on a pull request wins. Every commit on main keeps its own run, for the badge and
# for the release: publishing a release relies on main's CI having passed on the commit the release
# PR merged onto (scripts/release-ci-gate.ts). In one group, a push landing while another commit's
# run was in progress replaced the pending run of the commit before it, and that commit never got a
# result.
#
# `github.workflow` keeps the release's own call of these checks out of main's group. A called
# workflow sees its caller's context, so without it Publish release's checks shared
# `ci-refs/heads/main` with main's push runs: they queued behind whichever was in progress (the
# five-minute wait before the checks of v0.3.1) and cancelled the one that was pending.
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.sha || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
# Formatting, linting, typing and tests are independent checks, so each reports its own result.
static:
name: format, lint, types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# Checkout leaves a usable credential in the runner otherwise, which every later step and
# every action it calls can read. Nothing here pushes.
persist-credentials: false
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.4.3
- run: bun install --frozen-lockfile
- run: bun run format:check
- run: bun run lint
- run: bun run typecheck
- name: Desktop version tracks the release version
run: bun desktop/scripts/desktop-version.ts check
# The API contract. api/openapi.yaml is the single source of truth every client is generated from,
# so four things are checked about it, each its own step so a red run names which:
#
# - it is what its sources bundle to: each area's operations live in api/openapi/<area>.yaml and the
# shared conventions in api/openapi/common.yaml, so builders editing different areas do not
# collide, and api/openapi.yaml is the bundle of them, checked in so every consumer reads one file;
# - it keeps OpenBot's API conventions (redocly.yaml, api/redocly/rules.mjs), which are Intelligence
# v2's, and takes no address Intelligence already serves (api/intelligence-reserved.yaml);
# - the clients generated from it are the ones committed (the app's app/src/lib/api/generated, the
# phone app's mobile/src/api/generated and the Recorder's extension/src/shared/generated):
# generated code is checked in, so each builds from what review saw, and this fails when somebody
# edited the spec without regenerating or edited the output by hand;
# - on a pull request, it breaks nothing a client of the base branch relies on. oasdiff compares the
# base branch's spec with this one and fails on any breaking change, warnings included: a field a
# client reads going away is a warning to oasdiff and a broken screen to a person. A change that
# takes nothing from a client (a rule the server already enforced, now written in the spec) is
# listed with its reason in api/accepted-breaking-changes.md, and only that change passes.
api:
name: API spec
runs-on: ubuntu-latest
env:
# Pinned with its checksum, from https://github.com/oasdiff/oasdiff/releases. The spec never
# leaves the runner: the binary runs here, rather than the action, which uploads by default.
OASDIFF_VERSION: 1.34.1
OASDIFF_SHA256: 75775f65b0adebd26a8e013af51a799342dfdc6262d89efa9e3b7bdf89657d90
REDOCLY_TELEMETRY: "off"
REDOCLY_SUPPRESS_UPDATE_NOTICE: "true"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.4.3
- run: bun install --frozen-lockfile
- name: The bundled spec matches its sources
run: |
set -euo pipefail
bun run api:bundle
changed="$(git status --porcelain -- api/openapi.yaml)"
if [ -n "$changed" ]; then
echo "$changed"
git --no-pager diff -- api/openapi.yaml | head -n 200
echo "::error::api/openapi.yaml is not what api/openapi/*.yaml bundle to. Edit the sources, run bun run api:bundle and commit the result."
exit 1
fi
- name: Lint the spec
run: bun run api:lint
- name: The generated clients match the spec
run: |
set -euo pipefail
bun run api:generate
generated=(app/src/lib/api/generated mobile/src/api/generated extension/src/shared/generated)
changed="$(git status --porcelain -- "${generated[@]}")"
if [ -n "$changed" ]; then
echo "$changed"
git --no-pager diff -- "${generated[@]}" | head -n 200
echo "::error::A generated client (${generated[*]}) is not what api/openapi.yaml generates. Run bun run api:generate and commit the result."
exit 1
fi
- name: No breaking change against the base branch
if: github.event_name == 'pull_request'
env:
BASE_REF: ${{ github.base_ref }}
run: |
set -euo pipefail
git fetch --no-tags --depth=1 origin "$BASE_REF"
if ! git cat-file -e FETCH_HEAD:api/openapi.yaml 2>/dev/null; then
echo "::notice::$BASE_REF has no api/openapi.yaml yet, so this pull request cannot break it."
exit 0
fi
git show FETCH_HEAD:api/openapi.yaml > "$RUNNER_TEMP/base-openapi.yaml"
archive="$RUNNER_TEMP/oasdiff.tar.gz"
curl -fsSL -o "$archive" "https://github.com/oasdiff/oasdiff/releases/download/v${OASDIFF_VERSION}/oasdiff_${OASDIFF_VERSION}_linux_amd64.tar.gz"
echo "${OASDIFF_SHA256} $archive" | sha256sum -c -
tar -xzf "$archive" -C "$RUNNER_TEMP" oasdiff
# A change listed in api/accepted-breaking-changes.md, with its reason, is let through; oasdiff
# matches each line by method, path and the change's own words, so nothing else is.
accepted=api/accepted-breaking-changes.md
# Twice: once readable in the log, once as annotations on the pull request's diff.
"$RUNNER_TEMP/oasdiff" breaking "$RUNNER_TEMP/base-openapi.yaml" api/openapi.yaml --flatten-allof --err-ignore "$accepted" --warn-ignore "$accepted" || true
"$RUNNER_TEMP/oasdiff" breaking "$RUNNER_TEMP/base-openapi.yaml" api/openapi.yaml --flatten-allof --fail-on WARN --format githubactions --err-ignore "$accepted" --warn-ignore "$accepted"
# The live channels (api/asyncapi.yaml). The differences come from the AsyncAPI CLI, pinned in
# api/asyncapi-tools with its own lockfile so only this job installs it; what counts as breaking
# is decided in api/asyncapi-diff.ts, whose tests run here against real edits to the file.
- name: Install the AsyncAPI CLI
run: bun install --cwd api/asyncapi-tools --frozen-lockfile
- name: The live channels' breaking-change check works
run: bun test api/asyncapi-diff.test.ts
- name: No breaking change to the live channels against the base branch
if: github.event_name == 'pull_request'
env:
BASE_REF: ${{ github.base_ref }}
run: |
set -euo pipefail
git fetch --no-tags --depth=1 origin "$BASE_REF"
if ! git cat-file -e FETCH_HEAD:api/asyncapi.yaml 2>/dev/null; then
echo "::notice::$BASE_REF has no api/asyncapi.yaml yet, so this pull request cannot break it."
exit 0
fi
git show FETCH_HEAD:api/asyncapi.yaml > "$RUNNER_TEMP/base-asyncapi.yaml"
bun run api:live:diff "$RUNNER_TEMP/base-asyncapi.yaml" api/asyncapi.yaml
mobile:
name: native types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '22'
cache: npm
cache-dependency-path: mobile/package-lock.json
# The native app is an isolated npm package; adding it to Bun workspaces would change the
# existing desktop/server installation contract. CI installs its own reviewed lockfile.
- run: npm ci --prefix mobile --ignore-scripts
- run: npm run --prefix mobile typecheck
# The app's and the desktop window's tests that need a real Chromium, asked for by name because a
# machine running `bun test` is not required to have a browser. The browser is the one the root's
# playwright-core pins, installed by that same package: a bare `bunx playwright` fetches the newest
# Playwright, whose Chromium is a different build from the one playwright-core launches.
app-browser:
name: app (real browser)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.4.3
- run: bun install --frozen-lockfile
- run: bunx playwright-core install --with-deps --no-shell chromium
# The app's real-browser tests: a running step's words
# under reduced motion, where onboarding's Back lands beside the Mac window's buttons, the name
# step's orb drawn whole under the step dashes, a conversation's rail of turns clear of the
# Bot's text, one frame around an interface drawn in a Card, the page under the update banner
# holding still as an update gets ready, Home's message box holding still while the
# microphone's notice shows, a reply staying where it was written once its turn is over,
# every skin's top-left corner clear of the Mac window's buttons, OpenDots' Bots badge on its
# icon's corner inside the rail, the version in the account row read whole, an organization's
# name in the account menu read whole or in a tooltip, a Bot's orb
# one color in the sidebar, on its page and at the top of its conversation, Record on
# screen with a Bot's page in a window of any width, the team screens and a Bot's
# Publish dialog holding their layout wide, narrow and on a phone, and the Admin screens
# where a rule or a grant names a team holding theirs wide and on a phone, an unticked
# tickbox's edge standing 3:1 from what it is drawn on in light and dark, a Needs you row read
# whole at a phone's width and a chat's with its answers on a line of their own, a Bot's maths
# drawn as formulas in KaTeX's font with a wide one scrolling in its own block, which only a
# browser's layout, cascade
# and paint resolve, and the app following the system's light or dark, which only a
# browser's `prefers-color-scheme` reports, with what OpenBot Desktop's window is told of
# it. The
# onboarding frame reads the generated app config, which `bun test` alone doesn't write (the
# test script's pretest does).
- run: |
bun run generate:app-config
bun test app/tests/tool-line-reduced-motion.test.tsx app/tests/onboarding-window-buttons.test.tsx app/tests/onboarding-orb-room.test.tsx app/tests/transcript-rail-clearance.test.tsx app/tests/a2ui-frame.test.tsx app/tests/update-banner-layout.test.tsx app/tests/composer-dictation-notice-layout.test.tsx app/tests/conversation-intro-halo.test.tsx app/tests/transcript-room.test.tsx app/tests/skins-window-buttons.test.tsx app/tests/opendots-rail-badge.test.tsx app/tests/account-version-layout.test.tsx app/tests/organization-menu-names.test.tsx app/tests/bot-orb-one-color.test.tsx app/tests/theme-follows-system.test.tsx app/tests/desktop-window-theme.test.tsx app/tests/bot-screen-record-layout.test.tsx app/tests/teams-screens-layout.test.tsx app/tests/team-grants-screens-layout.test.tsx app/tests/needs-you-board-layout.test.tsx app/tests/checkbox-contrast.test.tsx app/tests/maths-rendering.test.tsx
env:
OPENBOT_APP_BROWSER: '1'
# The desktop setup window's, for the same reason: the AI step's form holding still while the
# install behind it comes and goes. It bundles the window from the desktop's own dependencies.
- run: bun install --frozen-lockfile
working-directory: desktop
- run: bun test src/setupLayout.browser.test.ts
working-directory: desktop
env:
OPENBOT_APP_BROWSER: '1'
# The suite in shards, one runner each, so the run takes as long as its slowest shard rather than
# as long as every file one after another. `bun test --shard` does the split, cut by the per-file
# durations in scripts/test-timings.json so the shards take about as long as each other (dealt
# round-robin, the few files that take a minute each pile up on one runner). Every shard has its
# own installs, so the shards share no state. The `tests` job below is the result people read.
#
# The id stays `test` for the upstream upgrade, which runs this job's `run` steps as CI's own
# checks (scripts/integrate-upstream.ts); the shard reaches those steps through
# .github/actions/test-shard, which says why.
test:
name: tests (shard ${{ matrix.shard }} of ${{ strategy.job-total }})
runs-on: ubuntu-latest
strategy:
# Every shard runs to the end, so one red run names every failing test, not just the first
# shard's.
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.4.3
- uses: $/.github/actions/test-shard
with:
shard: ${{ matrix.shard }}/${{ strategy.job-total }}
- run: bun install --frozen-lockfile
# The Bots are not root workspaces and each keeps its own lockfile. The Mastra Bot's: root
# test discovery imports its receiver tests, which load Mastra from that Bot's own dependency
# tree.
- run: bun install --frozen-lockfile
working-directory: agent-mastra
# Same for the desktop app: root test discovery imports its React tests, whose JSX runtime is
# pinned by the desktop lockfile rather than the root one.
- run: bun install --frozen-lockfile
working-directory: desktop
# This shard's tests, failing on a failed test or on a count it cannot read. The floor under the
# count is the suite's, so the `tests` job checks it on the sum of the shards.
- run: bun run test:ci
# The shard's count, and how long each of its files took.
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: test-shard-${{ matrix.shard }}
path: ${{ env.TEST_COUNT_DIR }}
if-no-files-found: error
retention-days: 1
# One result for the suite, under the name the unsharded job had. A passing job must include the
# expected test floor: import-time failures can otherwise skip files before their tests are
# registered, and a shard cannot see that, because it does not know how big it is meant to be. So
# this fails when any shard did not succeed, when any shard's count is missing, and when the counts
# add up to less than the floor (scripts/test-floor.ts).
test-total:
name: tests
runs-on: ubuntu-latest
# Also when a shard failed, so this reports the failure rather than being skipped, which a
# required check would read as a pass.
if: always()
needs: [test]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.4.3
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: test-shard-*
path: ${{ runner.temp }}/test-counts
merge-multiple: true
- name: The shards passed and add up to the floor
env:
SHARDS_RESULT: ${{ needs.test.result }}
run: bun scripts/test-ci-aggregate.ts "$RUNNER_TEMP/test-counts" "$RUNNER_TEMP/test-timings.json"
# This run's per-file durations, to download over scripts/test-timings.json when the shards
# drift out of balance.
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: test-timings
path: ${{ runner.temp }}/test-timings.json
if-no-files-found: ignore
retention-days: 14
startup:
name: startup (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# No cached Bun on Windows. The cache keeps bun.exe at a path relative to the workspace, so
# one saved by a job whose workspace was on C: restores to D:\Users\... on a runner whose
# workspace is on D:, and setup-bun then fails on C:\Users\runneradmin\.bun\bin\bun.exe
# ("Unable to locate executable file") instead of downloading Bun.
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.4.3
no-cache: ${{ runner.os == 'Windows' }}
- run: bun install --frozen-lockfile
- run: bun test app/tests/build-cache.test.ts
python-harness:
name: python harness regressions
# CPU-bound: runs on a 16-core larger runner (org runner group openbot-larger, billed per
# minute) for main, releases and pull requests from this repository. Pull requests from forks
# stay on the free standard runner.
runs-on: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && 'ubuntu-latest' || 'openbot-ubuntu-16core' }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.12"
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.4.3
- name: CrewAI provider-boundary regression
run: |
set -euo pipefail
python -m venv .venv-crewai
. .venv-crewai/bin/activate
python -m pip install --requirement agent-crewai/requirements.txt --requirement agent-crewai/requirements-test.txt
python -m pytest agent-crewai/tests -q
- name: Claude client-tool continuation regressions
run: |
set -euo pipefail
python -m venv .venv-claude-sdk
. .venv-claude-sdk/bin/activate
python -m pip install --requirement agent-claude-sdk/requirements.txt --requirement agent-claude-sdk/requirements-test.txt
python -m pytest agent-claude-sdk/tests -q
- name: LangGraph AG-UI provider-boundary regressions
run: |
set -euo pipefail
python -m venv .venv-langgraph-agui
. .venv-langgraph-agui/bin/activate
python -m pip install --requirement agent-langgraph-agui/requirements.txt --requirement agent-langgraph-agui/requirements-test.txt
python -m pytest agent-langgraph-agui/tests -q
- name: LlamaIndex model-choice regression
run: |
set -euo pipefail
python -m venv .venv-llamaindex
. .venv-llamaindex/bin/activate
python -m pip install --requirement agent-llamaindex/requirements.txt --requirement agent-llamaindex/requirements-test.txt
python -m pytest agent-llamaindex/tests -q
- name: Agno model-choice regression
run: |
set -euo pipefail
python -m venv .venv-agno
. .venv-agno/bin/activate
python -m pip install --requirement agent-agno/requirements.txt --requirement agent-agno/requirements-test.txt
python -m pytest agent-agno/tests -q
- name: Strands model-choice regression
run: |
set -euo pipefail
python -m venv .venv-strands
. .venv-strands/bin/activate
python -m pip install --requirement agent-strands/requirements.txt --requirement agent-strands/requirements-test.txt
python -m pytest agent-strands/tests -q
- name: Pydantic AI model-choice regression
run: |
set -euo pipefail
python -m venv .venv-pydantic-ai
. .venv-pydantic-ai/bin/activate
python -m pip install --requirement agent-pydantic-ai/requirements.txt --requirement agent-pydantic-ai/requirements-test.txt
python -m pytest agent-pydantic-ai/tests -q
- name: Google ADK tool-call regressions
run: |
set -euo pipefail
python -m venv .venv-adk
. .venv-adk/bin/activate
python -m pip install --requirement agent-adk/requirements.txt --requirement agent-adk/requirements-test.txt
python -m pytest agent-adk/tests -q
- name: Antigravity provider pin and token gate
run: |
set -euo pipefail
python -m venv .venv-antigravity
. .venv-antigravity/bin/activate
python -m pip install --requirement agent-antigravity/requirements.txt --requirement agent-antigravity/requirements-test.txt
python -m pytest agent-antigravity/tests -q
- name: Langroid model-choice and tool-call regressions
run: |
set -euo pipefail
python -m venv .venv-langroid
. .venv-langroid/bin/activate
python -m pip install --requirement agent-langroid/requirements.txt --requirement agent-langroid/requirements-test.txt
python -m pytest agent-langroid/tests -q
- name: AG2 model-choice regression
run: |
set -euo pipefail
python -m venv .venv-ag2
. .venv-ag2/bin/activate
python -m pip install --requirement agent-ag2/requirements.txt --requirement agent-ag2/requirements-test.txt
python -m pytest agent-ag2/tests -q
- name: Microsoft Agent Framework model-choice regression
run: |
set -euo pipefail
python -m venv .venv-microsoft
. .venv-microsoft/bin/activate
python -m pip install --requirement agent-microsoft/requirements.txt --requirement agent-microsoft/requirements-test.txt
python -m pytest agent-microsoft/tests -q
- run: bun install --frozen-lockfile
- run: bun test tests/compose.test.ts
- run: docker compose --env-file /dev/null --profile harness config --format json >/dev/null
env:
PICKED_HARNESS_IMAGE: openbot-agent-langgraph-agui:test
# Docker Desktop shipped Compose v2.24.5 in early 2024, and that version refuses the whole
# project when any service's image is blank, profile or not. The desktop app runs
# `compose config` before it starts, so this is the oldest Compose it has to get past.
- name: Compose v2.24.5 reads the file with no harness picked
run: |
set -euo pipefail
case "$(uname -m)" in
x86_64) arch=x86_64; sum=94355be1d1d395040bbda1490f98d5c7627c30798a7955e1f2a78fda33a4b3e1 ;;
aarch64) arch=aarch64; sum=535e90ff9a7f24384f8a38f9f9ad49125485af7ae5ffda7226d091e5b8126948 ;;
*) echo "no pinned Compose v2.24.5 for $(uname -m)" >&2; exit 1 ;;
esac
compose="$RUNNER_TEMP/docker-compose-2.24.5"
curl -fsSL --retry 3 -o "$compose" "https://github.com/docker/compose/releases/download/v2.24.5/docker-compose-linux-$arch"
echo "$sum $compose" | sha256sum -c -
chmod +x "$compose"
"$compose" version
unset PICKED_HARNESS_IMAGE
"$compose" -f docker-compose.yml -f desktop/src-tauri/telemetry.compose.yml --env-file /dev/null config --format json >/dev/null
PICKED_HARNESS_IMAGE=openbot-agent-langgraph-agui:test "$compose" --env-file /dev/null --profile harness config --format json >/dev/null
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.4.3
- run: bun install --frozen-lockfile
- run: bun run build
# The images the release publishes from this tree: the Bots and the harnesses. Nothing else here
# builds them: they are built by `docker compose up --build` or pulled by a harness pick, so a
# broken Dockerfile used to surface during a release.
#
# Built, not pushed, and one architecture: this answers whether the Dockerfile resolves. Whether
# it resolves on arm64 too is answered at release time, on an arm64 runner.
#
# No registry cache, so a release builds these a second time. `type=gha` needs ACTIONS_* in the
# environment, which `build-push-action` injects and a plain `run:` step does not have, and
# reaching for another action to export them would buy minutes in a job that runs rarely at the
# price of a dependency in the one workflow whose inputs are a security boundary.
component-dockerfiles:
name: component dockerfiles
runs-on: ubuntu-latest
# Minutes rather than seconds, so on a pull request it runs only when an admin adds the
# `full-ci` label, the point at which the PR is actually a merge candidate. On main and through
# the release's workflow_call it always runs. `verify` treats a skipped job as passing.
if: >-
github.event_name != 'pull_request' ||
contains(github.event.pull_request.labels.*.name, 'full-ci')
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
# A Dockerfile the release does not publish is one a machine would build from source, so the
# list and the tree have to agree. Checked here rather than trusted, because the failure is
# silent: the release succeeds and a laptop somewhere builds the image.
- name: Every buildable service is published
run: |
set -euo pipefail
found="$(find . -mindepth 2 -maxdepth 2 -name Dockerfile -not -path './node_modules/*' \
| sed -e 's|^\./||' -e 's|/Dockerfile$||' | sort)"
published="$(jq -r '.[]' .github/published-images.json | sort)"
if [ "$found" != "$published" ]; then
echo "::error::.github/published-images.json does not match the Dockerfiles in the tree."
diff <(echo "$published") <(echo "$found") || true
exit 1
fi
- name: They build
run: |
set -euo pipefail
while read -r image; do
echo "::group::$image"
docker buildx build --file "$image/Dockerfile" --platform linux/amd64 .
echo "::endgroup::"
done < <(jq -r '.[]' .github/published-images.json)
# One check for branch protection to require. A new job above is covered by this without anybody
# remembering to add it to a list, and a job that was skipped for the wrong reason is not a pass.
verify:
name: verify
runs-on: ubuntu-latest
if: always()
needs: [static, api, mobile, app-browser, test, test-total, startup, python-harness, build, component-dockerfiles]
steps:
- name: Require every check
env:
RESULTS: ${{ join(needs.*.result, ' ') }}
run: |
set -euo pipefail
echo "$RESULTS"
for result in $RESULTS; do
case "$result" in
success|skipped) ;;
*) echo "::error::A required check reported $result"; exit 1 ;;
esac
done