memos/.github/workflows/frontend-tests.yml
K.B.Dharun Krishna b02aa2d5e5
chore: bump actions in workflows (#2588)
Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-12-08 09:55:18 +08:00

53 lines
1.2 KiB
YAML

name: Frontend Test
on:
push:
branches: [main]
pull_request:
branches:
- main
- "release/*.*.*"
paths:
- "web/**"
jobs:
eslint-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2.4.0
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: pnpm
cache-dependency-path: "web/pnpm-lock.yaml"
- run: pnpm install
working-directory: web
- run: pnpm type-gen
working-directory: web
- name: Run eslint check
run: pnpm lint
working-directory: web
frontend-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2.4.0
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: pnpm
cache-dependency-path: "web/pnpm-lock.yaml"
- run: pnpm install
working-directory: web
- run: pnpm type-gen
working-directory: web
- name: Run frontend build
run: pnpm build
working-directory: web