ci.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. name: 'ci'
  2. on:
  3. push:
  4. branches:
  5. - '**'
  6. pull_request:
  7. branches:
  8. - main
  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
  26. lint-and-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 eslint
  41. run: pnpm run lint
  42. - name: Run type declaration tests
  43. run: pnpm run test-dts
  44. size:
  45. runs-on: ubuntu-latest
  46. env:
  47. CI_JOB_NUMBER: 1
  48. steps:
  49. - uses: actions/checkout@v2
  50. - name: Install pnpm
  51. uses: pnpm/action-setup@v2.0.1
  52. with:
  53. version: 6.15.1
  54. - name: Set node version to 16
  55. uses: actions/setup-node@v2
  56. with:
  57. node-version: 16
  58. cache: 'pnpm'
  59. - run: pnpm install
  60. - run: pnpm run size
  61. # - name: Check build size
  62. # uses: posva/size-check-action@v1.1.2
  63. # with:
  64. # github_token: ${{ secrets.GITHUB_TOKEN }}
  65. # build_script: size
  66. # files: packages/vue/dist/vue.global.prod.js packages/runtime-dom/dist/runtime-dom.global.prod.js packages/size-check/dist/index.js