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
4 changes: 3 additions & 1 deletion .github/workflows/skills-ref.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.RELEASE_PR_TOKEN }}

- uses: actions/setup-python@v5
with:
Expand All @@ -44,4 +46,4 @@ jobs:
exit 0
fi
git commit -m "chore(badge): update skills-ref validation badge [skip ci]"
git push
git push
15 changes: 15 additions & 0 deletions scripts/skills-ref-badge.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { describe, expect, test } from "bun:test";
import { readFileSync } from "node:fs";
import { join } from "node:path";
import { buildBadgeJson } from "./skills-ref-badge";

const skillsRefWorkflow = readFileSync(
join(import.meta.dir, "..", ".github/workflows/skills-ref.yml"),
"utf8",
);

describe("skills-ref-badge buildBadgeJson", () => {
test("all skills valid -> green score badge", () => {
expect(buildBadgeJson(8, 8)).toEqual({
Expand Down Expand Up @@ -30,3 +37,11 @@ describe("skills-ref-badge buildBadgeJson", () => {
});
});
});

describe("skills-ref badge workflow", () => {
test("authenticates protected-branch pushes with the release token", () => {
expect(skillsRefWorkflow).toMatch(
/- uses: actions\/checkout@v4\n\s+with:\n\s+token: \$\{\{ secrets\.RELEASE_PR_TOKEN \}\}/,
);
});
});
Loading