Skip to content

MkPaginationのリファクタリング (#360) #903

MkPaginationのリファクタリング (#360)

MkPaginationのリファクタリング (#360) #903

Workflow file for this run

name: Lint
on:
push:
branches:
- master
- develop
- develop-mame
pull_request:
permissions: {}
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
workspace:
- backend
- frontend
- sw
- misskey-js
env:
eslint-cache-version: v1
eslint-cache-path: ${{ github.workspace }}/node_modules/.cache/eslint-${{ matrix.workspace }}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version-file: '.node-version'
cache: 'pnpm'
- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check if lock file is not modified
run: git diff --exit-code pnpm-lock.yaml
- name: Restore eslint cache
uses: actions/[email protected]
with:
path: ${{ env.eslint-cache-path }}
key: eslint-${{ env.eslint-cache-version }}-${{ matrix.workspace }}-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: eslint-${{ env.eslint-cache-version }}-${{ matrix.workspace }}-${{ hashFiles('**/pnpm-lock.yaml') }}-
- name: Run lint
run: pnpm --filter ${{ matrix.workspace }} run eslint --cache --cache-location ${{ env.eslint-cache-path }} --cache-strategy content
typecheck:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
workspace:
- backend
- frontend
- sw
- misskey-js
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version-file: '.node-version'
cache: 'pnpm'
- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check if lock file is not modified
run: git diff --exit-code pnpm-lock.yaml
- name: Build misskey-js
run: pnpm --filter misskey-js run build
if: ${{ matrix.workspace == 'backend' || matrix.workspace == 'frontend' || matrix.workspace == 'sw' }}
- name: Run typecheck
run: pnpm --filter ${{ matrix.workspace }} run typecheck