mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
38 lines
698 B
YAML
38 lines
698 B
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
unit-test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: pnpm
|
|
|
|
- name: Install deps
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Unit Test
|
|
env:
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
|
run: pnpm run test --run
|
|
|
|
- name: Upload coverage
|
|
if: github.ref == 'refs/heads/main'
|
|
uses: codecov/codecov-action@v4
|