Skip to content

Commit

Permalink
fix: forgot uses
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Aug 10, 2024
1 parent b7ec9ba commit 2410b07
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ describe("createMultiWorkflowFile", () => {
name: Job A
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: task-a
job_b:
name: Job B
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- uses: task-b
name: Test Name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export type MultiWorkflowJobStep = { run: string } | { uses: string };
export interface MultiWorkflowJobOptions {
name: string;
steps: MultiWorkflowJobStep[];
with?: Record<string, string>;
}

export interface MultiWorkflowFileOptions {
Expand All @@ -23,7 +24,12 @@ export function createMultiWorkflowFile({
{
name: job.name,
"runs-on": "ubuntu-latest",
steps: job.steps,
steps: [
{ uses: "actions/checkout@v4" },
{ uses: "./.github/actions/prepare" },
...job.steps,
],
with: job.with,
},
]),
),
Expand Down
28 changes: 28 additions & 0 deletions src/steps/writing/creation/dotGitHub/createWorkflows.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,49 +71,69 @@ describe("createWorkflows", () => {
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm build
- run: node ./lib/index.js
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm build
- run: pnpm lint
lint_knip:
name: Lint Knip
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm lint:knip
lint_markdown:
name: Lint Markdown
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm lint:md
lint_packages:
name: Lint Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm lint:packages
lint_spelling:
name: Lint spelling
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm lint:spelling
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm format --list-different
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm run test --coverage
- uses: codecov/codecov-action@v3
with:
flags: unit
type_check:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm tsc
name: CI
Expand Down Expand Up @@ -292,22 +312,30 @@ describe("createWorkflows", () => {
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm build
- run: node ./lib/index.js
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm lint
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm format --list-different
type_check:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm tsc
name: CI
Expand Down
3 changes: 3 additions & 0 deletions src/steps/writing/creation/dotGitHub/createWorkflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ export function createWorkflows(options: Options) {
{ run: "pnpm run test --coverage" },
{ uses: "codecov/codecov-action@v3" },
],
with: {
flags: "unit",
},
},
]),
],
Expand Down

0 comments on commit 2410b07

Please sign in to comment.