ci.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. name: 'ci'
  2. on:
  3. push:
  4. branches:
  5. - '**'
  6. pull_request:
  7. branches:
  8. - master
  9. jobs:
  10. test:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v2
  14. - name: Set node version to 16
  15. uses: actions/setup-node@v2
  16. with:
  17. node-version: 16
  18. cache: 'yarn'
  19. - run: yarn install --frozen-lockfile
  20. - name: Run unit tests
  21. run: yarn test --ci
  22. test-dts:
  23. runs-on: ubuntu-latest
  24. steps:
  25. - uses: actions/checkout@v2
  26. - name: Set node version to 16
  27. uses: actions/setup-node@v2
  28. with:
  29. node-version: 16
  30. cache: 'yarn'
  31. - run: yarn install --frozen-lockfile
  32. - name: Run type declaration tests
  33. run: yarn test-dts
  34. size:
  35. runs-on: ubuntu-latest
  36. env:
  37. CI_JOB_NUMBER: 1
  38. steps:
  39. - uses: actions/checkout@v1
  40. - name: Set node version to 16
  41. uses: actions/setup-node@v2
  42. with:
  43. node-version: 16
  44. cache: 'yarn'
  45. - run: yarn install --frozen-lockfile
  46. - name: Check build size
  47. uses: posva/size-check-action@v1.1.2
  48. with:
  49. github_token: ${{ secrets.GITHUB_TOKEN }}
  50. build_script: size
  51. files: packages/vue/dist/vue.global.prod.js packages/runtime-dom/dist/runtime-dom.global.prod.js packages/size-check/dist/size-check.global.prod.js