Skip to content

Commit 76b7b81

Browse files
fix: invert test.yml excludes logic
1 parent ddf1318 commit 76b7b81

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

src/steps/writing/creation/dotGitHub/createWorkflows.test.ts

+20-20
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,26 @@ describe("createWorkflows", () => {
355355
permissions:
356356
contents: write
357357
id-token: write
358+
",
359+
"test.yml": "jobs:
360+
test:
361+
runs-on: ubuntu-latest
362+
steps:
363+
- uses: actions/checkout@v4
364+
- uses: ./.github/actions/prepare
365+
- run: pnpm run test --coverage
366+
- name: Codecov
367+
uses: codecov/codecov-action@v3
368+
with:
369+
github-token: \${{ secrets.GITHUB_TOKEN }}
370+
371+
name: Test
372+
373+
on:
374+
pull_request: ~
375+
push:
376+
branches:
377+
- main
358378
",
359379
"tsc.yml": "jobs:
360380
type_check:
@@ -446,26 +466,6 @@ describe("createWorkflows", () => {
446466
447467
name: Prettier
448468
449-
on:
450-
pull_request: ~
451-
push:
452-
branches:
453-
- main
454-
",
455-
"test.yml": "jobs:
456-
test:
457-
runs-on: ubuntu-latest
458-
steps:
459-
- uses: actions/checkout@v4
460-
- uses: ./.github/actions/prepare
461-
- run: pnpm run test --coverage
462-
- name: Codecov
463-
uses: codecov/codecov-action@v3
464-
with:
465-
github-token: \${{ secrets.GITHUB_TOKEN }}
466-
467-
name: Test
468-
469469
on:
470470
pull_request: ~
471471
push:

src/steps/writing/creation/dotGitHub/createWorkflows.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ export function createWorkflows(options: Options) {
266266
],
267267
}),
268268
}),
269-
...(options.excludeTests && {
269+
...(!options.excludeTests && {
270270
"test.yml": createWorkflowFile({
271271
name: "Test",
272272
steps: [

0 commit comments

Comments
 (0)