ci.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. name: 'ci'
  2. on:
  3. push:
  4. branches:
  5. - '**'
  6. pull_request:
  7. branches:
  8. - main
  9. permissions:
  10. contents: read # to fetch code (actions/checkout)
  11. jobs:
  12. unit-test:
  13. runs-on: ubuntu-latest
  14. steps:
  15. - uses: actions/checkout@v2
  16. - name: Install pnpm
  17. uses: pnpm/action-setup@v2
  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-unit
  26. e2e-test:
  27. runs-on: ubuntu-latest
  28. steps:
  29. - uses: actions/checkout@v2
  30. - name: Install pnpm
  31. uses: pnpm/action-setup@v2
  32. - name: Set node version to 16
  33. uses: actions/setup-node@v2
  34. with:
  35. node-version: 16
  36. cache: 'pnpm'
  37. - run: pnpm install
  38. - name: Run e2e tests
  39. run: pnpm run test-e2e
  40. lint-and-test-dts:
  41. runs-on: ubuntu-latest
  42. steps:
  43. - uses: actions/checkout@v2
  44. - name: Install pnpm
  45. uses: pnpm/action-setup@v2
  46. - name: Set node version to 16
  47. uses: actions/setup-node@v2
  48. with:
  49. node-version: 16
  50. cache: 'pnpm'
  51. - run: pnpm install
  52. - name: Run eslint
  53. run: pnpm run lint
  54. - name: Run type declaration tests
  55. run: pnpm run test-dts
  56. size:
  57. runs-on: ubuntu-latest
  58. env:
  59. CI_JOB_NUMBER: 1
  60. steps:
  61. - uses: actions/checkout@v2
  62. - name: Install pnpm
  63. uses: pnpm/action-setup@v2
  64. - name: Set node version to 16
  65. uses: actions/setup-node@v2
  66. with:
  67. node-version: 16
  68. cache: 'pnpm'
  69. - run: pnpm install
  70. - run: pnpm run size
  71. # - name: Check build size
  72. # uses: posva/size-check-action@v1.1.2
  73. # with:
  74. # github_token: ${{ secrets.GITHUB_TOKEN }}
  75. # build_script: size
  76. # files: packages/vue/dist/vue.global.prod.js packages/runtime-dom/dist/runtime-dom.global.prod.js packages/size-check/dist/index.js