Skip to content

Commit dbd904e

Browse files
committed
chore: Add lint job
1 parent e2cac08 commit dbd904e

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/ci.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ const workflow = new Workflow("CI", {
99
permissions: {},
1010
});
1111

12+
workflow.addJob(
13+
setupJob("lint", {
14+
permissions: {
15+
contents: "read",
16+
},
17+
timeoutMinutes: 5,
18+
withBun: true,
19+
}).run("bun run lint"),
20+
);
21+
1222
workflow.addJob(
1323
setupJob("test", {
1424
permissions: { contents: "read" },

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# DO NOT EDIT THIS FILE
22
# This file is automatically generated by ghats (https://www.npmjs.com/package/ghats)
33
# Edit the workflow in .github/workflows/ci.ts instead, and run `ghats build` to update this file.
4-
{"name":"CI","on":{"pull_request":{"branches":["main"]},"push":{"branches":["main"]}},"permissions":{},"jobs":{"test":{"runs-on":"ubuntu-latest","permissions":{"contents":"read"},"timeout-minutes":5,"steps":[{"with":{"persist-credentials":"false"},"uses":"actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"},{"uses":"jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8"},{"with":{"path":"~/.bun/install/cache","key":"${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}","restore-keys":"${{ runner.os }}-bun-"},"uses":"actions/cache@5a3ec84eff668545956fd18022155c47e93e2684"},{"run":"bun install --frozen-lockfile"},{"run":"bun test --coverage --coverage-reporter=lcov"},{"with":{"token":"${{ secrets.CODECOV_TOKEN }}","files":"coverage/lcov.info","disable_search":"true","verbose":"true"},"uses":"codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574"}]},"build-workflow":{"runs-on":"ubuntu-latest","permissions":{"contents":"read"},"timeout-minutes":5,"steps":[{"with":{"persist-credentials":"false"},"uses":"actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"},{"uses":"jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8"},{"with":{"path":"~/.bun/install/cache","key":"${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}","restore-keys":"${{ runner.os }}-bun-"},"uses":"actions/cache@5a3ec84eff668545956fd18022155c47e93e2684"},{"run":"bun install --frozen-lockfile"},{"run":"\ncat <<EOF > ./.github/workflows/example.ts\nimport { Workflow, Job } from \"ghats\";\n\nconst workflow = new Workflow(\"Hello\", {\n on: \"push\",\n});\n\nworkflow.addJob(\n new Job(\"hello\", {\n runsOn: \"ubuntu-latest\",\n })\n .uses(\"actions/checkout@v4\")\n .run(\"echo 'Hello, world!'\"),\n);\n\nexport default workflow;\nEOF\n"},{"run":"bun run ./lib/cli/index.ts install"},{"run":"bun run ./lib/cli/index.ts build ./.github/workflows/example.ts"},{"run":"cat ./.github/workflows/example.yml"}]}}}
4+
{"name":"CI","on":{"pull_request":{"branches":["main"]},"push":{"branches":["main"]}},"permissions":{},"jobs":{"lint":{"runs-on":"ubuntu-latest","permissions":{"contents":"read"},"timeout-minutes":5,"steps":[{"with":{"persist-credentials":"false"},"uses":"actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"},{"uses":"jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8"},{"with":{"path":"~/.bun/install/cache","key":"${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}","restore-keys":"${{ runner.os }}-bun-"},"uses":"actions/cache@5a3ec84eff668545956fd18022155c47e93e2684"},{"run":"bun install --frozen-lockfile"},{"run":"bun run lint"}]},"test":{"runs-on":"ubuntu-latest","permissions":{"contents":"read"},"timeout-minutes":5,"steps":[{"with":{"persist-credentials":"false"},"uses":"actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"},{"uses":"jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8"},{"with":{"path":"~/.bun/install/cache","key":"${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}","restore-keys":"${{ runner.os }}-bun-"},"uses":"actions/cache@5a3ec84eff668545956fd18022155c47e93e2684"},{"run":"bun install --frozen-lockfile"},{"run":"bun test --coverage --coverage-reporter=lcov"},{"with":{"token":"${{ secrets.CODECOV_TOKEN }}","files":"coverage/lcov.info","disable_search":"true","verbose":"true"},"uses":"codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574"}]},"build-workflow":{"runs-on":"ubuntu-latest","permissions":{"contents":"read"},"timeout-minutes":5,"steps":[{"with":{"persist-credentials":"false"},"uses":"actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"},{"uses":"jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8"},{"with":{"path":"~/.bun/install/cache","key":"${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}","restore-keys":"${{ runner.os }}-bun-"},"uses":"actions/cache@5a3ec84eff668545956fd18022155c47e93e2684"},{"run":"bun install --frozen-lockfile"},{"run":"\ncat <<EOF > ./.github/workflows/example.ts\nimport { Workflow, Job } from \"ghats\";\n\nconst workflow = new Workflow(\"Hello\", {\n on: \"push\",\n});\n\nworkflow.addJob(\n new Job(\"hello\", {\n runsOn: \"ubuntu-latest\",\n })\n .uses(\"actions/checkout@v4\")\n .run(\"echo 'Hello, world!'\"),\n);\n\nexport default workflow;\nEOF\n"},{"run":"bun run ./lib/cli/index.ts install"},{"run":"bun run ./lib/cli/index.ts build ./.github/workflows/example.ts"},{"run":"cat ./.github/workflows/example.yml"}]}}}

0 commit comments

Comments
 (0)