Skip to content

Commit

Permalink
ci(lint): CIの各lintを別のjobにする
Browse files Browse the repository at this point in the history
  • Loading branch information
yamadashy committed Oct 11, 2024
1 parent 40d8034 commit 297cca1
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 32 deletions.
75 changes: 44 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,66 +12,79 @@ on:
workflow_dispatch:

jobs:
lint:
lint-biome:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .tool-versions
cache: yarn
- run: yarn install
- run: yarn lint-biome && git diff --exit-code

- name: Setup node
uses: actions/setup-node@v4
lint-ts:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .tool-versions
cache: yarn
- run: yarn install
- run: yarn lint-ts

- name: Install dependencies
run: yarn install
lint-secretlint:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .tool-versions
cache: yarn
- run: yarn install
- run: yarn lint-secretlint

- name: Lint
run: yarn lint && git diff --exit-code
validate-renovate-config:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .tool-versions
- name: Validate Renovate config
run: npx --yes --package renovate -- renovate-config-validator --strict

test:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .tool-versions
cache: yarn

- name: Install dependencies
run: yarn install

- name: Test
run: yarn test-coverage
- run: yarn install
- run: yarn test-coverage

generate:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .tool-versions
cache: yarn

- name: Install dependencies
run: yarn install

- run: yarn install
- name: Generate feed
run: yarn feed-generate

- name: Generate site
run: yarn site-build

- name: Archive feed
uses: actions/upload-artifact@v4
with:
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"register-index": "tsx src/feed/register-index-command.ts",
"site-build": "tsx ./node_modules/.bin/eleventy --config=eleventy.config.ts",
"site-serve": "tsx ./node_modules/.bin/eleventy --config=eleventy.config.ts --serve",
"lint": "biome check --write && tsc --noEmit && secretlint '**/*'",
"lint": "yarn lint-biome && yarn lint-ts && yarn lint-secretlint",
"lint-biome": "biome check --write",
"lint-ts": "tsc --noEmit",
"lint-secretlint": "secretlint '**/*'",
"test": "vitest run",
"test-coverage": "vitest run --coverage",
"renovate-validate": "renovate-config-validator"
Expand Down

0 comments on commit 297cca1

Please sign in to comment.