mirror of
https://github.com/usememos/memos.git
synced 2024-12-24 03:33:52 +03:00
58 lines
1.2 KiB
YAML
58 lines
1.2 KiB
YAML
name: Frontend Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- "release/v*.*.*"
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- "web/**"
|
|
|
|
jobs:
|
|
eslint-checks:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "18"
|
|
cache: yarn
|
|
cache-dependency-path: "web/yarn.lock"
|
|
- run: yarn
|
|
working-directory: web
|
|
- name: Run eslint check
|
|
run: yarn lint
|
|
working-directory: web
|
|
|
|
jest-tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "18"
|
|
cache: yarn
|
|
cache-dependency-path: "web/yarn.lock"
|
|
- run: yarn
|
|
working-directory: web
|
|
- name: Run jest
|
|
run: yarn test
|
|
working-directory: web
|
|
|
|
frontend-build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "18"
|
|
cache: yarn
|
|
cache-dependency-path: "web/yarn.lock"
|
|
- run: yarn
|
|
working-directory: web
|
|
- name: Run frontend build
|
|
run: yarn build
|
|
working-directory: web
|