mirror of
https://github.com/element-plus/element-plus.git
synced 2025-12-19 09:09:40 +08:00
* chore(ci): use setup-node cache * fix: Consistent with the naming on the Node.js * fix: 还原命名 * fix: 1
44 lines
894 B
YAML
44 lines
894 B
YAML
name: 🧪 Unit Test
|
|
|
|
on:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
name: Unit Test (${{ matrix.node-name }})
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [20, 22, 24]
|
|
include:
|
|
- node-version: 20
|
|
node-name: LTS
|
|
- node-version: 22
|
|
node-name: Current
|
|
- node-version: 24
|
|
node-name: New
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Setup node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm i --frozen-lockfile
|
|
|
|
- name: Test
|
|
run: pnpm test
|