Skip to content

ci(code-check): update cache config #3

ci(code-check): update cache config

ci(code-check): update cache config #3

Workflow file for this run

name: Code Check
on:
push:
branches: [main]
pull_request:
types: [opened]
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pnpm
uses: pnpm/action-setup@v3
with:
version: 8.15.4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Cache dependencies
id: node_modules_cache_id
uses: actions/cache@v4
with:
path: node_modules
key: node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Install dependencies
run: pnpm install
lint:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pnpm
uses: pnpm/action-setup@v3
with:
version: 8.15.4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Restore cached dependencies
uses: actions/cache@v4
with:
path: node_modules
key: node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Lint Check
run: pnpm lint
type-check:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pnpm
uses: pnpm/action-setup@v3
with:
version: 8.15.4
- name: Cache dependencies
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Type Check
run: pnpm typecheck
unit-test:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pnpm
uses: pnpm/action-setup@v3
with:
version: 8.15.4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Cache dependencies
uses: actions/cache@v4
with:
path: node_modules
key: node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Unit Test
run: pnpm test
build:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pnpm
uses: pnpm/action-setup@v3
with:
version: 8.15.4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Cache dependencies
uses: actions/cache@v4
with:
path: node_modules
key: node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Build
run: pnpm build