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
16 changes: 16 additions & 0 deletions packages/core/src/__snapshots__/workflow-generator.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,19 @@ jobs:
run: bun test
"
`;

exports[`workflow-generator > generateWorkflowYaml > should render reusable workflow call job deterministically 1`] = `
"# This file is autogenerated by DotGitHub. Do not edit manually.
name: Reusable Caller
on:
pull_request:
branches:
- main
jobs:
lint:
uses: ./.github/workflows/lint.yml
with:
node: "22"
secrets: inherit
"
`;
22 changes: 22 additions & 0 deletions packages/core/src/workflow-generator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,28 @@ describe('workflow-generator', () => {

expect(generateWorkflowYaml(workflow)).toMatchSnapshot();
});

it('should render reusable workflow call job deterministically', () => {
const workflow: GitHubWorkflow = {
name: 'Reusable Caller',
on: {
pull_request: {
branches: ['main'],
},
},
jobs: {
lint: {
uses: './.github/workflows/lint.yml',
with: {
node: '22',
},
secrets: 'inherit',
} as unknown as GitHubJob,
},
};

expect(generateWorkflowYaml(workflow)).toMatchSnapshot();
});
});

describe('createWorkflow', () => {
Expand Down