mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-10-27 02:43:58 +08:00
chore: improve ci
This commit is contained in:
33
.github/workflows/ci.yml
vendored
33
.github/workflows/ci.yml
vendored
@ -40,7 +40,7 @@ jobs:
|
||||
run: pnpm run typecheck && pnpm run dev:typecheck
|
||||
|
||||
- name: Test
|
||||
run: pnpm run test
|
||||
run: pnpm run test:coverage
|
||||
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
@ -48,39 +48,10 @@ jobs:
|
||||
- name: Publint
|
||||
run: pnpm run publint
|
||||
|
||||
coverage:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'pull_request' || github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: 22
|
||||
cache: pnpm
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Setup Playwright (Chromium)
|
||||
uses: microsoft/playwright-github-action@v1
|
||||
with:
|
||||
browsers: chromium
|
||||
|
||||
- name: Test (with coverage)
|
||||
run: pnpm run test:coverage
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
if: ${{ github.event_name == 'pull_request' || github.ref == 'refs/heads/main' }}
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: coverage/browser/lcov.info
|
||||
flags: browser
|
||||
disable_search: true
|
||||
fail_ci_if_error: true
|
||||
|
||||
Reference in New Issue
Block a user