mirror of
https://github.com/usememos/memos.git
synced 2024-12-21 02:01:55 +03:00
55 lines
1.3 KiB
YAML
55 lines
1.3 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@v3
|
|
- uses: bufbuild/buf-setup-action@v1
|
|
- run: buf generate
|
|
working-directory: proto
|
|
- uses: pnpm/action-setup@v2.2.4
|
|
with:
|
|
version: 8
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "18"
|
|
cache: pnpm
|
|
cache-dependency-path: "web/pnpm-lock.yaml"
|
|
- run: pnpm install
|
|
working-directory: web
|
|
- name: Run eslint check
|
|
run: pnpm lint
|
|
working-directory: web
|
|
|
|
frontend-build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: bufbuild/buf-setup-action@v1
|
|
- run: buf generate
|
|
working-directory: proto
|
|
- uses: pnpm/action-setup@v2.2.4
|
|
with:
|
|
version: 8
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "18"
|
|
cache: pnpm
|
|
cache-dependency-path: "web/pnpm-lock.yaml"
|
|
- run: pnpm install
|
|
working-directory: web
|
|
- name: Run frontend build
|
|
run: pnpm build
|
|
working-directory: web
|