mirror of
https://github.com/selfboot/ai_gallery.git
synced 2026-06-04 21:06:53 +08:00
34 lines
765 B
YAML
34 lines
765 B
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, dev ]
|
|
pull_request:
|
|
branches: [ main, dev ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 9.9.0 # 使用与本地相同的版本
|
|
- name: Check pnpm version
|
|
run: pnpm --version
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Run tests
|
|
run: pnpm test -- --coverage
|
|
- name: Upload results to Codecov
|
|
uses: codecov/codecov-action@v4
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|