vue3-yuanma/.github/workflows/ci.yml

54 lines
1.3 KiB
YAML
Raw Normal View History

name: 'ci'
2020-10-15 23:37:00 +08:00
on:
2020-10-20 05:19:49 +08:00
push:
branches:
- '**'
2020-10-15 23:37:00 +08:00
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
2021-09-21 00:26:16 +08:00
- uses: actions/checkout@v2
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
cache: 'yarn'
2021-09-21 00:43:06 +08:00
- run: yarn install --frozen-lockfile
- name: Run unit tests
run: yarn test --ci
test-dts:
runs-on: ubuntu-latest
steps:
2021-09-21 00:26:16 +08:00
- uses: actions/checkout@v2
2021-07-30 00:35:35 +08:00
- name: Set node version to 16
uses: actions/setup-node@v2
with:
node-version: 16
2021-09-21 00:26:16 +08:00
cache: 'yarn'
2021-09-21 00:43:06 +08:00
- run: yarn install --frozen-lockfile
- name: Run type declaration tests
run: yarn test-dts
2020-10-15 23:37:00 +08:00
size:
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
steps:
2021-09-21 00:40:05 +08:00
- uses: actions/checkout@v1
2021-07-30 00:35:35 +08:00
- name: Set node version to 16
uses: actions/setup-node@v2
with:
node-version: 16
2021-09-21 00:26:16 +08:00
cache: 'yarn'
2021-09-21 00:43:06 +08:00
- run: yarn install --frozen-lockfile
- name: Check build size
2021-09-21 00:40:05 +08:00
uses: posva/size-check-action@v1.1.2
2020-10-15 23:37:00 +08:00
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
build_script: size
2021-09-24 02:46:16 +08:00
files: packages/vue/dist/vue.global.prod.js packages/runtime-dom/dist/runtime-dom.global.prod.js packages/size-check/dist/index.js