Skip to content

Commit

Permalink
Lint ワークフローを修正 (#15)
Browse files Browse the repository at this point in the history
* Ubuntu のバージョンを変更

* Node.js 14 を実行環境から除外

* actions/setup-node を v3 に変更

* pnpm/action-setup を使用するように変更

* キャッシュの設定を actions/setup-node に移行

* actions/checkout を v3 に変更
  • Loading branch information
kou64yama authored Jul 30, 2023
1 parent e68cf58 commit 27a0e44
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 23 deletions.
33 changes: 10 additions & 23 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,19 @@ on:

jobs:
lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
node: [14, 16, 18]
node: [16, 18]
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@main
- name: Use Node.js ${{ matrix.node }}.x
uses: actions/setup-node@main
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node: ${{ matrix.node }}
node-version: ${{ matrix.node }}
check-latest: true
- name: Cache ~/.pnpm-store
uses: actions/cache@main
env:
cache-name: cache-pnpm-store
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ matrix.node }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node }}-build-${{ env.cache-name }}-
${{ runner.os }}-${{ matrix.node }}-build-
${{ runner.os }}-
- name: Install pnpm
run: npm i -g pnpm
- name: Lint
run: |
pnpm install
pnpm run lint
cache: pnpm
- uses: pnpm/action-setup@v2
- run: pnpm install
- run: pnpm run lint
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"private": true,
"author": "Yamada Koji <[email protected]>",
"type": "module",
"packageManager": "[email protected]",
"scripts": {
"prepare": "husky install",
"lint": "textlint ."
Expand Down

0 comments on commit 27a0e44

Please sign in to comment.