| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- name: 'ci'
- on:
- push:
- branches:
- - '**'
- pull_request:
- branches:
- - main
- permissions:
- contents: read # to fetch code (actions/checkout)
- jobs:
- unit-test:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Install pnpm
- uses: pnpm/action-setup@v2
- - name: Set node version to 18
- uses: actions/setup-node@v3
- with:
- node-version: 18
- cache: 'pnpm'
- - run: PUPPETEER_SKIP_DOWNLOAD=1 pnpm install
- - name: Run unit tests
- run: pnpm run test-unit
- e2e-test:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Setup cache for Chromium binary
- uses: actions/cache@v3
- with:
- path: ~/.cache/puppeteer/chrome
- key: chromium-${{ hashFiles('pnpm-lock.yaml') }}
- - name: Install pnpm
- uses: pnpm/action-setup@v2
- - name: Set node version to 18
- uses: actions/setup-node@v3
- with:
- node-version: 18
- 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@v3
- - name: Install pnpm
- uses: pnpm/action-setup@v2
- - name: Set node version to 18
- uses: actions/setup-node@v3
- with:
- node-version: 18
- cache: 'pnpm'
- - run: PUPPETEER_SKIP_DOWNLOAD=1 pnpm install
- - name: Run eslint
- run: pnpm run lint
- # - name: Run prettier
- # run: pnpm run format-check
- - name: Run type declaration tests
- run: pnpm run test-dts
- size:
- runs-on: ubuntu-latest
- env:
- CI_JOB_NUMBER: 1
- steps:
- - uses: actions/checkout@v3
- - name: Install pnpm
- uses: pnpm/action-setup@v2
- - name: Set node version to 18
- uses: actions/setup-node@v3
- with:
- node-version: 18
- cache: 'pnpm'
- - run: PUPPETEER_SKIP_DOWNLOAD=1 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
|