Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(ci): install visual acceptance dependencies (#5593)

Cindy Zhangbef71c4fa335
diff --git a/.github/scripts/visual-gate/workflow-concurrency.test.mjs b/.github/scripts/visual-gate/workflow-concurrency.test.mjs
index 56dd491721..458fe5fd2d 100644
--- a/.github/scripts/visual-gate/workflow-concurrency.test.mjs
+++ b/.github/scripts/visual-gate/workflow-concurrency.test.mjs
@@ -121,6 +121,18 @@ describe('visual acceptance workflow concurrency', () => {
expect(authorize).toContain("? 'maintain'");
});
+ it('installs the dependencies used by the acceptance archive script', () => {
+ const value = workflow('visual-acceptance.yml');
+ const accept = value.slice(value.indexOf(' accept:'));
+
+ expect(accept.indexOf('uses: ./.github/actions/setup')).toBeGreaterThan(-1);
+ expect(accept.indexOf('uses: ./.github/actions/setup')).toBeLessThan(
+ accept.indexOf(
+ 'node .github/scripts/visual-gate/visual-acceptance.mjs accept',
+ ),
+ );
+ });
+
it('uses the same head identity for post-merge promotion', () => {
const value = workflow('visual-acceptance-promote.yml');
diff --git a/.github/workflows/visual-acceptance.yml b/.github/workflows/visual-acceptance.yml
index f03b30457e..d1e6b25a74 100644
--- a/.github/workflows/visual-acceptance.yml
+++ b/.github/workflows/visual-acceptance.yml
@@ -226,6 +226,10 @@ jobs:
if: needs.authorize.outputs.valid == 'true'
uses: actions/checkout@v7
+ - name: Setup Node and pnpm
+ if: needs.authorize.outputs.valid == 'true'
+ uses: ./.github/actions/setup
+
- name: Archive the acceptance decision
id: record
if: needs.authorize.outputs.valid == 'true'