Skip to content

Commit b52b13d

Browse files
committed
fix(ci): replace unavailable PowerShell action
1 parent f51deb5 commit b52b13d

2 files changed

Lines changed: 19 additions & 10 deletions

File tree

‎.github/workflows/sync-check.yml‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13-
- name: Install PowerShell
14-
uses: microsoft/powershell@v1
15-
- name: Sync check
16-
run: pwsh scripts/sync-check.ps1
17-
- name: Frontmatter validate
18-
run: pwsh scripts/validate-frontmatter.ps1
19-
- name: Install mermaid-cli
20-
run: npm install -g @mermaid-js/mermaid-cli
21-
- name: Validate mermaid
22-
run: pwsh scripts/validate-mermaid.ps1
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: 22
16+
cache: npm
17+
- name: Install dependencies
18+
run: npm ci
19+
- name: Validate sync, frontmatter, and Mermaid
20+
run: npm run lint

‎scripts/ci-config.test.mjs‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ test("deploy workflow uses valid expressions and runs its lint dependency on eve
1717
assert.doesNotMatch(lintMatch.groups.body, /^\s+if:/m);
1818
});
1919

20+
test("PR sync workflow uses the repository Node validation pipeline", async () => {
21+
const workflow = await readFile(
22+
new URL(".github/workflows/sync-check.yml", repositoryRoot),
23+
"utf8",
24+
);
25+
26+
assert.doesNotMatch(workflow, /microsoft\/powershell/);
27+
assert.match(workflow, /run:\s+npm ci/);
28+
assert.match(workflow, /run:\s+npm run lint/);
29+
});
30+
2031
test("Mermaid validation supplies the documented Chromium CI sandbox override", async () => {
2132
const validator = await readFile(
2233
new URL("scripts/validate-mermaid.mjs", repositoryRoot),

0 commit comments

Comments
 (0)