Skip to content
Open
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
6 changes: 6 additions & 0 deletions .changeset/friendly-runners-use-bash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@agent-native/core": patch
"@agent-native/recap-cli": patch
---

Run configurable PR Visual Recap jobs with Bash on every runner platform.
3 changes: 3 additions & 0 deletions .github/workflows/pr-visual-recap-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ jobs:
if: needs.gate.outputs.run == 'true'
runs-on: ${{ fromJSON(needs.gate.outputs.runs_on) }}
timeout-minutes: 30
defaults:
run:
shell: bash
permissions:
actions: write
checks: write
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pr-visual-recap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ jobs:
if: needs.gate.outputs.run == 'true'
runs-on: ${{ fromJSON(needs.gate.outputs.runs_on) }}
timeout-minutes: 30
defaults:
run:
shell: bash
permissions:
actions: write
checks: write
Expand Down
5 changes: 3 additions & 2 deletions packages/core/src/cli/pr-visual-recap-workflow.ts

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions packages/core/src/cli/recap.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2726,6 +2726,9 @@ describe("bundled PR visual recap workflow", () => {
expect(PR_VISUAL_RECAP_WORKFLOW_YML).toContain(
"runs-on: ${{ fromJSON(needs.gate.outputs.runs_on) }}",
);
expect(PR_VISUAL_RECAP_WORKFLOW_YML).toContain(
" defaults:\n run:\n shell: bash",
);
expect(PR_VISUAL_RECAP_WORKFLOW_YML).toContain(
"core.setOutput('runs_on', JSON.stringify(configuredRunner))",
);
Expand Down Expand Up @@ -3267,6 +3270,7 @@ describe("reusable workflow file structure", () => {
expect(content).toContain(
"runs-on: ${{ fromJSON(needs.gate.outputs.runs_on) }}",
);
expect(content).toContain(" defaults:\n run:\n shell: bash");
expect(content).toContain(
"core.setOutput('runs_on', JSON.stringify(configuredRunner))",
);
Expand Down
29 changes: 29 additions & 0 deletions packages/recap-cli/src/pr-visual-recap-workflow.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { readFileSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";

import { describe, expect, it } from "vitest";

import { PR_VISUAL_RECAP_WORKFLOW_YML } from "./pr-visual-recap-workflow.js";

const repoRoot = path.resolve(
path.dirname(fileURLToPath(import.meta.url)),
"../../..",
);

describe("the recap installer workflow", () => {
it("keeps Bash semantics on configurable runners", () => {
expect(PR_VISUAL_RECAP_WORKFLOW_YML).toContain(
" defaults:\n run:\n shell: bash",
);
});

it("bundles the canonical workflow byte for byte", () => {
const source = readFileSync(
path.join(repoRoot, ".github/workflows/pr-visual-recap.yml"),
"utf8",
);

expect(PR_VISUAL_RECAP_WORKFLOW_YML).toBe(source);
});
});
2 changes: 1 addition & 1 deletion packages/recap-cli/src/pr-visual-recap-workflow.ts

Large diffs are not rendered by default.

Loading