2021-05-07 22:00:12 +08:00
|
|
|
name: 'ci'
|
2020-10-15 23:37:00 +08:00
|
|
|
on:
|
2020-10-20 05:19:49 +08:00
|
|
|
push:
|
|
|
|
branches:
|
2021-05-07 21:51:59 +08:00
|
|
|
- '**'
|
2020-10-15 23:37:00 +08:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2022-01-18 16:43:59 +08:00
|
|
|
- main
|
2020-10-15 23:37:00 +08:00
|
|
|
jobs:
|
2022-05-12 08:33:08 +08:00
|
|
|
unit-test:
|
2021-05-07 21:51:59 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-09-21 00:26:16 +08:00
|
|
|
- uses: actions/checkout@v2
|
2021-10-09 02:23:30 +08:00
|
|
|
|
|
|
|
- name: Install pnpm
|
|
|
|
uses: pnpm/action-setup@v2.0.1
|
|
|
|
with:
|
2022-05-12 08:33:08 +08:00
|
|
|
version: 7.0.1
|
2021-10-09 02:23:30 +08:00
|
|
|
|
2021-07-30 00:35:35 +08:00
|
|
|
- name: Set node version to 16
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
2021-09-21 00:26:16 +08:00
|
|
|
node-version: 16
|
2021-10-09 02:23:30 +08:00
|
|
|
cache: 'pnpm'
|
|
|
|
|
|
|
|
- run: pnpm install
|
|
|
|
|
2021-05-07 21:51:59 +08:00
|
|
|
- name: Run unit tests
|
2022-05-12 08:33:08 +08:00
|
|
|
run: pnpm run test-unit
|
|
|
|
|
|
|
|
e2e-test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install pnpm
|
|
|
|
uses: pnpm/action-setup@v2.0.1
|
|
|
|
with:
|
|
|
|
version: 7.0.1
|
|
|
|
|
|
|
|
- name: Set node version to 16
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
cache: 'pnpm'
|
|
|
|
|
|
|
|
- run: pnpm install
|
|
|
|
|
2022-05-12 08:38:48 +08:00
|
|
|
- name: Run e2e tests
|
2022-05-12 08:33:08 +08:00
|
|
|
run: pnpm run test-e2e
|
2021-05-07 21:51:59 +08:00
|
|
|
|
2022-05-10 10:47:32 +08:00
|
|
|
lint-and-test-dts:
|
2021-05-07 21:51:59 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-09-21 00:26:16 +08:00
|
|
|
- uses: actions/checkout@v2
|
2021-10-09 02:23:30 +08:00
|
|
|
|
|
|
|
- name: Install pnpm
|
|
|
|
uses: pnpm/action-setup@v2.0.1
|
|
|
|
with:
|
2022-05-12 08:33:08 +08:00
|
|
|
version: 7.0.1
|
2021-10-09 02:23:30 +08:00
|
|
|
|
2021-07-30 00:35:35 +08:00
|
|
|
- name: Set node version to 16
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 16
|
2021-10-09 02:23:30 +08:00
|
|
|
cache: 'pnpm'
|
|
|
|
|
|
|
|
- run: pnpm install
|
|
|
|
|
2022-05-10 10:47:32 +08:00
|
|
|
- name: Run eslint
|
|
|
|
run: pnpm run lint
|
|
|
|
|
2021-05-07 21:51:59 +08:00
|
|
|
- name: Run type declaration tests
|
2021-10-09 02:23:30 +08:00
|
|
|
run: pnpm run test-dts
|
2021-05-07 21:51:59 +08:00
|
|
|
|
2020-10-15 23:37:00 +08:00
|
|
|
size:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
CI_JOB_NUMBER: 1
|
|
|
|
steps:
|
2021-11-02 13:28:17 +08:00
|
|
|
- uses: actions/checkout@v2
|
2021-10-09 02:23:30 +08:00
|
|
|
|
|
|
|
- name: Install pnpm
|
|
|
|
uses: pnpm/action-setup@v2.0.1
|
|
|
|
with:
|
2022-05-12 08:33:08 +08:00
|
|
|
version: 7.0.1
|
2021-10-09 02:23:30 +08:00
|
|
|
|
2021-07-30 00:35:35 +08:00
|
|
|
- name: Set node version to 16
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 16
|
2021-10-09 02:23:30 +08:00
|
|
|
cache: 'pnpm'
|
|
|
|
|
|
|
|
- run: pnpm install
|
|
|
|
- run: pnpm run size
|
|
|
|
|
|
|
|
# - name: Check build size
|
|
|
|
# uses: posva/size-check-action@v1.1.2
|
|
|
|
# with:
|
|
|
|
# github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# build_script: size
|
|
|
|
# files: packages/vue/dist/vue.global.prod.js packages/runtime-dom/dist/runtime-dom.global.prod.js packages/size-check/dist/index.js
|