ci.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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: Install pnpm
  15. uses: pnpm/action-setup@v2.0.1
  16. with:
  17. version: 6.15.1
  18. - name: Set node version to 16
  19. uses: actions/setup-node@v2
  20. with:
  21. node-version: 16
  22. cache: 'pnpm'
  23. - run: pnpm install
  24. - name: Run unit tests
  25. run: pnpm run test -- --ci
  26. test-dts:
  27. runs-on: ubuntu-latest
  28. steps:
  29. - uses: actions/checkout@v2
  30. - name: Install pnpm
  31. uses: pnpm/action-setup@v2.0.1
  32. with:
  33. version: 6.15.1
  34. - name: Set node version to 16
  35. uses: actions/setup-node@v2
  36. with:
  37. node-version: 16
  38. cache: 'pnpm'
  39. - run: pnpm install
  40. - name: Run type declaration tests
  41. run: pnpm run test-dts
  42. size:
  43. runs-on: ubuntu-latest
  44. env:
  45. CI_JOB_NUMBER: 1
  46. steps:
  47. - uses: actions/checkout@v1
  48. - name: Install pnpm
  49. uses: pnpm/action-setup@v2.0.1
  50. with:
  51. version: 6.15.1
  52. - name: Set node version to 16
  53. uses: actions/setup-node@v2
  54. with:
  55. node-version: 16
  56. cache: 'pnpm'
  57. - run: pnpm install
  58. - run: pnpm run size
  59. # - name: Check build size
  60. # uses: posva/size-check-action@v1.1.2
  61. # with:
  62. # github_token: ${{ secrets.GITHUB_TOKEN }}
  63. # build_script: size
  64. # files: packages/vue/dist/vue.global.prod.js packages/runtime-dom/dist/runtime-dom.global.prod.js packages/size-check/dist/index.js