mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
57 lines
1.1 KiB
YAML
57 lines
1.1 KiB
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '18.x'
|
|
|
|
- name: Install dependencies
|
|
uses: bahmutov/npm-install@v1
|
|
|
|
- name: Run linter
|
|
run: npm run lint
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: szenius/set-timezone@v1.0
|
|
with:
|
|
timezoneLinux: "Asia/Shanghai"
|
|
timezoneMacos: "Asia/Shanghai"
|
|
timezoneWindows: "China Standard Time"
|
|
- uses: actions/checkout@v1
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '18.x'
|
|
|
|
- name: Install dependencies
|
|
uses: bahmutov/npm-install@v1
|
|
|
|
- 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@v1
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '18.x'
|
|
|
|
- name: Install dependencies
|
|
uses: bahmutov/npm-install@v1
|
|
|
|
- name: Build
|
|
run: npm run build:lib
|