code-qa.yml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. name: Code QA Kilo Code
  2. on:
  3. workflow_dispatch:
  4. push:
  5. branches: [main]
  6. pull_request:
  7. types: [opened, reopened, ready_for_review, synchronize]
  8. branches: [main]
  9. env:
  10. NODE_VERSION: 20.19.2
  11. PNPM_VERSION: 10.8.1
  12. TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
  13. TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
  14. jobs:
  15. compile:
  16. runs-on: ubuntu-latest
  17. steps:
  18. - name: Checkout code
  19. uses: actions/checkout@v4
  20. - name: Install pnpm
  21. uses: pnpm/action-setup@v4
  22. with:
  23. version: ${{ env.PNPM_VERSION }}
  24. - name: Setup Node.js
  25. uses: actions/setup-node@v4
  26. with:
  27. node-version: ${{ env.NODE_VERSION }}
  28. cache: "pnpm"
  29. - name: Turbo cache setup
  30. uses: actions/cache@v4
  31. with:
  32. path: .turbo
  33. key: ${{ runner.os }}-turbo-${{ github.sha }}
  34. restore-keys: |
  35. ${{ runner.os }}-turbo-
  36. - name: Install dependencies
  37. run: pnpm install
  38. - name: Build
  39. run: pnpm build
  40. - name: Check types
  41. run: pnpm check-types
  42. - name: Lint
  43. run: pnpm lint
  44. check-translations:
  45. runs-on: ubuntu-latest
  46. steps:
  47. - name: Checkout code
  48. uses: actions/checkout@v4
  49. - name: Install pnpm
  50. uses: pnpm/action-setup@v4
  51. with:
  52. version: ${{ env.PNPM_VERSION }}
  53. - name: Setup Node.js
  54. uses: actions/setup-node@v4
  55. with:
  56. node-version: "18"
  57. cache: "pnpm"
  58. - name: Turbo cache setup
  59. uses: actions/cache@v4
  60. with:
  61. path: .turbo
  62. key: ${{ runner.os }}-turbo-${{ github.sha }}
  63. restore-keys: |
  64. ${{ runner.os }}-turbo-
  65. - name: Install dependencies
  66. run: pnpm install
  67. - name: Verify all translations are complete
  68. run: node scripts/find-missing-translations.js
  69. test-extension:
  70. runs-on: ${{ matrix.os }}
  71. strategy:
  72. matrix:
  73. os: [ubuntu-latest, windows-latest]
  74. steps:
  75. - name: Checkout code
  76. uses: actions/checkout@v4
  77. - name: Install pnpm
  78. uses: pnpm/action-setup@v4
  79. with:
  80. version: ${{ env.PNPM_VERSION }}
  81. - name: Setup Node.js
  82. uses: actions/setup-node@v4
  83. with:
  84. node-version: ${{ env.NODE_VERSION }}
  85. cache: "pnpm"
  86. - name: Turbo cache setup
  87. uses: actions/cache@v4
  88. with:
  89. path: .turbo
  90. key: ${{ runner.os }}-turbo-${{ github.sha }}
  91. restore-keys: |
  92. ${{ runner.os }}-turbo-
  93. - name: Install dependencies
  94. run: pnpm install
  95. - name: Build (to build and copy WASM files)
  96. run: pnpm run vsix
  97. shell: bash
  98. - name: Run unit tests
  99. working-directory: src
  100. run: pnpm test
  101. test-webview:
  102. runs-on: ${{ matrix.os }}
  103. strategy:
  104. matrix:
  105. os: [ubuntu-latest, windows-latest]
  106. steps:
  107. - name: Checkout code
  108. uses: actions/checkout@v4
  109. - name: Install pnpm
  110. uses: pnpm/action-setup@v4
  111. with:
  112. version: ${{ env.PNPM_VERSION }}
  113. - name: Setup Node.js
  114. uses: actions/setup-node@v4
  115. with:
  116. node-version: "18"
  117. cache: "pnpm"
  118. - name: Turbo cache setup
  119. uses: actions/cache@v4
  120. with:
  121. path: .turbo
  122. key: ${{ runner.os }}-turbo-${{ github.sha }}
  123. restore-keys: |
  124. ${{ runner.os }}-turbo-
  125. - name: Install dependencies
  126. run: pnpm install
  127. - name: Run unit tests
  128. working-directory: webview-ui
  129. run: pnpm test
  130. unit-test:
  131. needs: [test-extension, test-webview]
  132. runs-on: ubuntu-latest
  133. steps:
  134. - name: NO-OP
  135. run: echo "All unit tests passed."
  136. test-jetbrains:
  137. runs-on: ubuntu-latest
  138. steps:
  139. - name: Checkout code
  140. uses: actions/checkout@v4
  141. with:
  142. submodules: recursive
  143. lfs: true
  144. - name: Install pnpm
  145. uses: pnpm/action-setup@v4
  146. with:
  147. version: ${{ env.PNPM_VERSION }}
  148. - name: Setup Node.js
  149. uses: actions/setup-node@v4
  150. with:
  151. node-version: ${{ env.NODE_VERSION }}
  152. cache: "pnpm"
  153. - uses: actions/setup-java@v4
  154. with:
  155. distribution: 'jetbrains'
  156. java-version: '17'
  157. - name: Install system dependencies
  158. run: |
  159. sudo apt-get update
  160. sudo apt-get install -y \
  161. libx11-dev \
  162. libxkbfile-dev \
  163. pkg-config \
  164. build-essential \
  165. python3
  166. - name: Turbo cache setup
  167. uses: actions/cache@v4
  168. with:
  169. path: .turbo
  170. key: ${{ runner.os }}-turbo-${{ github.sha }}
  171. restore-keys: |
  172. ${{ runner.os }}-turbo-
  173. - name: Install dependencies
  174. run: pnpm install
  175. - name: Build
  176. run: pnpm run jetbrains:build
  177. shell: bash