|
name: Lint |
|
on: |
|
pull_request: |
|
push: |
|
branches: |
|
- main |
|
jobs: |
|
lint: |
|
runs-on: ubuntu-latest |
|
timeout-minutes: 10 |
|
steps: |
|
- uses: actions/checkout@v3 |
|
- uses: actions/setup-node@v3 |
|
with: |
|
node-version: "20" |
|
- name: Install pnpm |
|
uses: pnpm/action-setup@v2 |
|
with: |
|
version: latest |
|
run_install: false |
|
- name: Get pnpm store directory |
|
id: pnpm-cache |
|
shell: bash |
|
run: | |
|
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT |
|
- uses: actions/cache@v3 |
|
with: |
|
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} |
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} |
|
restore-keys: | |
|
${{ runner.os }}-pnpm-store- |
|
- name: Install dependencies |
|
run: pnpm install --frozen-lockfile |
|
- name: "Checking lint/format errors" |
|
run: | |
|
pnpm run lint |
|
- name: "Checking type errors" |
|
run: | |
|
pnpm run check |
|
|