95 lines
1.9 KiB
YAML
95 lines
1.9 KiB
YAML
name: 'ci'
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
jobs:
|
|
unit-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v2
|
|
|
|
- name: Set node version to 16
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 16
|
|
cache: 'pnpm'
|
|
|
|
- run: pnpm install
|
|
|
|
- name: Run unit tests
|
|
run: pnpm run test-unit
|
|
|
|
e2e-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v2
|
|
|
|
- name: Set node version to 16
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 16
|
|
cache: 'pnpm'
|
|
|
|
- run: pnpm install
|
|
|
|
- name: Run e2e tests
|
|
run: pnpm run test-e2e
|
|
|
|
lint-and-test-dts:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v2
|
|
|
|
- name: Set node version to 16
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 16
|
|
cache: 'pnpm'
|
|
|
|
- run: pnpm install
|
|
|
|
- name: Run eslint
|
|
run: pnpm run lint
|
|
|
|
- name: Run type declaration tests
|
|
run: pnpm run test-dts
|
|
|
|
size:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CI_JOB_NUMBER: 1
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v2
|
|
|
|
- name: Set node version to 16
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 16
|
|
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
|