Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ jobs:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.sha }}
fetch-depth: 0

# A floating ref by decision, the one exception action-pins.test.ts names:
# next carries what no release-me release has yet, and builds from source.
- uses: TitusKirch/release-me/action@next
# Pinned like every other action. v0.5.0 is the first release that creates
# the release commit through the GitHub API, so the commit is signed and
# the release pull request passes signed-commit protection.
- uses: ostendorf-cloud/release-me/action@1ce702d00e64f065f639373321c7fb4f5775636a # v0.5.0
with:
token: ${{ steps.app-token.outputs.token }}

Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Workflows normally use **stubs**: a trigger and a `uses:` pointing at a body in
What follows:

- **Do not paste a workflow body back in.** If a stub almost fits, the answer is an input on the body or an own job beside the call — see that repository's `docs/1.guides/2.add-a-body.md`.
- **The pins are commit SHAs with the version as a trailing comment.** Dependabot raises the bumps; the `github-actions` ecosystem is already configured in `.github/dependabot.yml`. **One exception, by decision:** `release.yml` runs `TitusKirch/release-me/action@next`, a floating branch built from source, because that channel carries what no release-me release has yet. `action-pins.test.ts` names exactly that reference; move it back to a SHA once a release carries what duxt needs.
- **The pins are commit SHAs with the version as a trailing comment.** Dependabot raises the bumps; the `github-actions` ecosystem is already configured in `.github/dependabot.yml`. **No exception remains:** `release.yml` ran `TitusKirch/release-me/action@next`, a floating branch, until `ostendorf-cloud/release-me` v0.5.0 created the release commit through the GitHub API — signed, which a release pull request needs — and it is pinned like everything else since. `action-pins.test.ts` keeps an empty `FLOATING` set for the next exception, which has to name its exact reference there.
- **Publishing** is own jobs in `release.yml` — not a forked workflow — and **the registry decides, not an output**: a workspace package under `packages/` is published when its version has a `<component>@v<version>` tag and npm does not have that version yet, and a `dev-main` prerelease goes out only for the packages the push to `main` changed. A package release-me did not release therefore never publishes again, and a publish that failed halfway is picked up by the next push.
- **Checks come from `package.json`.** `ci.yml` runs whatever the `check` script chains, so adding a check needs no workflow change at all.

Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Workflows normally use **stubs**: a trigger and a `uses:` pointing at a body in
What follows:

- **Do not paste a workflow body back in.** If a stub almost fits, the answer is an input on the body or an own job beside the call — see that repository's `docs/1.guides/2.add-a-body.md`.
- **The pins are commit SHAs with the version as a trailing comment.** Dependabot raises the bumps; the `github-actions` ecosystem is already configured in `.github/dependabot.yml`. **One exception, by decision:** `release.yml` runs `TitusKirch/release-me/action@next`, a floating branch built from source, because that channel carries what no release-me release has yet. `action-pins.test.ts` names exactly that reference; move it back to a SHA once a release carries what duxt needs.
- **The pins are commit SHAs with the version as a trailing comment.** Dependabot raises the bumps; the `github-actions` ecosystem is already configured in `.github/dependabot.yml`. **No exception remains:** `release.yml` ran `TitusKirch/release-me/action@next`, a floating branch, until `ostendorf-cloud/release-me` v0.5.0 created the release commit through the GitHub API — signed, which a release pull request needs — and it is pinned like everything else since. `action-pins.test.ts` keeps an empty `FLOATING` set for the next exception, which has to name its exact reference there.
- **Publishing** is own jobs in `release.yml` — not a forked workflow — and **the registry decides, not an output**: a workspace package under `packages/` is published when its version has a `<component>@v<version>` tag and npm does not have that version yet, and a `dev-main` prerelease goes out only for the packages the push to `main` changed. A package release-me did not release therefore never publishes again, and a publish that failed halfway is picked up by the next push.
- **Checks come from `package.json`.** `ci.yml` runs whatever the `check` script chains, so adding a check needs no workflow change at all.

Expand Down
7 changes: 4 additions & 3 deletions apps/www/tests/action-pins.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { fileURLToPath } from 'node:url';
import { join } from 'node:path';
import { expect, it } from 'vitest';

// The one floating ref, by decision: release-me's next channel carries what no
// release has yet. Anything else, this action on another ref included, is pinned.
const FLOATING = new Set(['release.yml: TitusKirch/release-me/action@next']);
// Floating refs allowed by decision. None at present: release-me, the last one,
// is pinned since v0.5.0 carried what duxt needed. An entry here names the exact
// `<workflow>: <reference>` line it excuses.
const FLOATING = new Set<string>();

it('requires immutable Actions and reusable workflows with a readable version', () => {
const root = fileURLToPath(
Expand Down
27 changes: 26 additions & 1 deletion packages/duxt/tests/content-bundle-server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { createServer } from 'node:net';
import { once } from 'node:events';
import { DatabaseSync } from 'node:sqlite';
import { Worker } from 'node:worker_threads';
import { expect, it } from 'vitest';
import { expect, it, onTestFailed } from 'vitest';
import {
canonicalJson,
contentHash,
Expand All @@ -33,6 +33,31 @@ it('refreshes real Content, media, redirects, MCP and caches without restarting'
const root = mkdtempSync(join(layer, '.content-runtime-test-'));
let server: ReturnType<typeof spawn> | undefined;
let output = '';
// A request to the built server that never answers used to hang the whole
// test until vitest's own limit, which reports neither the request nor the
// server's output. Each request now carries its own deadline and is named
// while it is open, and a failure of any kind prints both.
const open: string[] = [];
onTestFailed(() => {
console.error(
`[content-bundle-server] requests still open: ${open.join(', ') || 'none'}\n` +
`--- server output (last 8000 characters) ---\n${output.slice(-8000)}`
);
});
const fetch = async (input: string, init: RequestInit = {}) => {
const label = `${init.method ?? 'GET'} ${input.replace(/^http:\/\/127\.0\.0\.1:\d+/, '')}`;
open.push(label);
try {
return await globalThis.fetch(input, {
...init,
signal: init.signal ?? AbortSignal.timeout(60000)
});
} catch (error) {
throw new Error(`${label} failed: ${String(error)}`, { cause: error });
} finally {
open.splice(open.indexOf(label), 1);
}
};
try {
for (const dir of [
'content/docs',
Expand Down
Loading