Skip to content

chore: improve action #7

chore: improve action

chore: improve action #7

Workflow file for this run

name: Sanity Checks
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
setup:
name: Setup Dependencies
runs-on: ubuntu-latest
outputs:
cache-key: ${{ steps.cache-node-modules.outputs.cache-hit }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install --immutable
sanity-check:
name: Sanity Checks
runs-on: ubuntu-latest
needs: [setup]
steps:
- name: Restore node_modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ needs.setup.outputs.cache-key }}
- name: Run Type Check
run: yarn run typecheck
- name: Run Lint
run: yarn run lint
- name: Run Tests
run: yarn run test