Skip to content

feat: add workflow to check code #1

feat: add workflow to check code

feat: add workflow to check code #1

Workflow file for this run

name: Check
on:
push:
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/[email protected]
with:
run_install: false
- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
- run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
shell: bash
id: pnpm-config
- id: cache-rotation
shell: bash
run: echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.pnpm-config.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-
- run: pnpm install --frozen-lockfile --prefer-offline --silent
shell: bash
env:
HUSKY: 0
- run: pnpm type-check
- run: pnpm lint
- run: pnpm test