memos/.github/workflows/frontend-tests.yml

56 lines
1.2 KiB
YAML
Raw Normal View History

2022-12-25 10:39:45 +08:00
name: Frontend Test
2022-08-24 21:12:08 +08:00
on:
pull_request:
2022-08-24 21:12:08 +08:00
branches:
- main
- "release/v*.*.*"
2022-12-25 10:39:45 +08:00
paths:
- "web/**"
2022-08-24 21:12:08 +08:00
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
2022-10-01 22:57:32 +08:00
jest-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
2022-10-01 22:57:32 +08:00
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