Repository navigation
ci : formatとlintのチェックを追加 #255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
b7780fa
67ffc9f
72612f9
52e8e56
ed8cbe6
435d301
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| quality: | ||
| name: Code quality | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version-file: .node-version | ||
| cache: pnpm | ||
| cache-dependency-path: pnpm-lock.yaml | ||
| - name: Restore quality caches | ||
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | ||
| with: | ||
| path: | | ||
| .eslintcache | ||
| .prettier-cache | ||
| key: quality-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml', 'package.json', 'eslint.config.js', '.prettierrc.json', '.prettierignore') }}-${{ github.sha }} | ||
| restore-keys: | | ||
| quality-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml', 'package.json', 'eslint.config.js', '.prettierrc.json', '.prettierignore') }}- | ||
| - name: Install dependencies | ||
| run: pnpm ci | ||
| - name: Run ESLint | ||
| run: pnpm lint:check | ||
| - name: Check Prettier formatting | ||
| run: pnpm format:check | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,9 @@ coverage | |
|
|
||
| *.tsbuildinfo | ||
|
|
||
| .eslintcache | ||
| .prettier-cache | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 一応確認しておくと、ワークフローにてPrettierのキャッシュは保存しないことにしたけど将来的にやっぱり保存する可能性もあるので記述のみ .gitignore に残した、という理解でよいですか?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. すみません!!実行時間が十分早かったのでキャッシュなくしたのですが、gitignoreから消し忘れてました!! |
||
|
|
||
| .env.local | ||
| .env.*.local | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| *.md | ||
| pnpm-lock.yaml | ||
| public/mockServiceWorker.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
他のワークフローの記述を参考にしつつ、ジョブ名を
ものに変えてみるとより分かりやすくなると思います。私がパッと思いつくところだと Lint and Format とか
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
より具体的な方が分かりやすいのでそうします!