mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
76 lines
1.2 KiB
YAML
76 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
|
|
pull_request:
|
|
branches:
|
|
- dev
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install pnpm
|
|
run: npm i pnpm@7 -g
|
|
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '16'
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Run linter
|
|
run: npm run lint
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install pnpm
|
|
run: npm i pnpm@7 -g
|
|
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '16'
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Run test cases
|
|
run: npm test
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install pnpm
|
|
run: npm i pnpm@7 -g
|
|
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '16'
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Build
|
|
run: npm run build
|