Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions .github/workflows/windows-advisory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ run-name: windows advisory @ ${{ github.ref_name }} / ${{ github.sha }}
on:
push:
branches: [dev]
pull_request:
branches: [dev]
workflow_dispatch:

concurrency:
Expand All @@ -13,6 +15,7 @@ concurrency:

permissions:
contents: read
pull-requests: read

jobs:
changes:
Expand Down
8 changes: 4 additions & 4 deletions packages/opencode/test/github/ci-workflow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -534,14 +534,14 @@ describe("ci workflow", () => {

expect(parsed.name).toBe("windows-advisory")
expect(workflow).toContain("run-name: windows advisory @ ${{ github.ref_name }} / ${{ github.sha }}")
expect(workflow).toContain("push:")
expect(workflow).toContain("branches: [dev]")
expect(parsed.on?.push).toEqual({ branches: ["dev"] })
expect(parsed.on?.pull_request).toEqual({ branches: ["dev"] })
expect(parsed.on?.workflow_dispatch).toEqual(null)
expect(workflow).toContain("workflow_dispatch:")
expect(workflow).not.toContain("pull_request:")
expect(parsed.concurrency?.group).toContain("github.ref == 'refs/heads/dev'")
expect(parsed.concurrency?.group).toContain("github.run_id")
expect(parsed.concurrency?.["cancel-in-progress"]).toBe("${{ github.ref != 'refs/heads/dev' }}")
expect(parsed.permissions).toEqual({ contents: "read" })
expect(parsed.permissions).toEqual({ contents: "read", "pull-requests": "read" })
expect(checkoutStep("changes", windowsAdvisoryWorkflowPath)?.uses).toBe(pinned.checkout)
expect(checkoutStep("changes", windowsAdvisoryWorkflowPath)?.with?.["persist-credentials"]).toBe(false)
expect(checkoutStep(windowsUnitJobName, windowsAdvisoryWorkflowPath)?.uses).toBe(pinned.checkout)
Expand Down
Loading