|
14 | 14 | branches:
|
15 | 15 | - main
|
16 | 16 | paths:
|
| 17 | + - "extensions/intellij/**" |
17 | 18 | - "extensions/vscode/**"
|
18 | 19 | - "core/**"
|
19 | 20 | - "gui/**"
|
@@ -293,3 +294,107 @@ jobs:
|
293 | 294 | run: |
|
294 | 295 | cd gui
|
295 | 296 | npm test
|
| 297 | +
|
| 298 | + jetbrains-tests: |
| 299 | + needs: [install-root, core-checks] |
| 300 | + runs-on: ubuntu-latest |
| 301 | + steps: |
| 302 | + - uses: actions/checkout@v4 |
| 303 | + |
| 304 | + - uses: actions/cache@v4 |
| 305 | + with: |
| 306 | + path: core/node_modules |
| 307 | + key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }} |
| 308 | + |
| 309 | + - name: Setup Java |
| 310 | + |
| 311 | + with: |
| 312 | + distribution: zulu |
| 313 | + java-version: 17 |
| 314 | + |
| 315 | + - name: Setup FFmpeg |
| 316 | + uses: AnimMouse/setup-ffmpeg@v1 |
| 317 | + with: |
| 318 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 319 | + |
| 320 | + - name: Setup Gradle |
| 321 | + uses: gradle/actions/setup-gradle@v3 |
| 322 | + |
| 323 | + - name: Use Node.js from .nvmrc |
| 324 | + uses: actions/setup-node@v4 |
| 325 | + with: |
| 326 | + node-version-file: ".nvmrc" |
| 327 | + |
| 328 | + - uses: actions/cache@v4 |
| 329 | + id: gui-cache |
| 330 | + with: |
| 331 | + path: gui/node_modules |
| 332 | + key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }} |
| 333 | + |
| 334 | + - name: Build GUI |
| 335 | + run: | |
| 336 | + cd gui |
| 337 | + npm ci |
| 338 | + npm run build |
| 339 | +
|
| 340 | + - name: Run prepackage script |
| 341 | + run: | |
| 342 | + cd extensions/vscode |
| 343 | + npm ci |
| 344 | + npm run prepackage |
| 345 | + env: |
| 346 | + # https://github.com/microsoft/vscode-ripgrep/issues/9#issuecomment-643965333 |
| 347 | + GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} |
| 348 | + |
| 349 | + - uses: actions/cache@v4 |
| 350 | + id: binary-cache |
| 351 | + with: |
| 352 | + path: binary/node_modules |
| 353 | + key: ${{ runner.os }}-binary-node-modules-${{ hashFiles('binary/package-lock.json') }} |
| 354 | + |
| 355 | + - name: Build the binaries |
| 356 | + run: | |
| 357 | + cd binary |
| 358 | + npm run build |
| 359 | +
|
| 360 | + - name: Start test IDE |
| 361 | + run: | |
| 362 | + cd extensions/intellij |
| 363 | + export DISPLAY=:99.0 |
| 364 | + Xvfb -ac :99 -screen 0 1920x1080x24 & |
| 365 | + sleep 10 |
| 366 | + mkdir -p build/reports |
| 367 | + ./gradlew runIdeForUiTests & |
| 368 | +
|
| 369 | + - name: Wait for JB connection |
| 370 | + uses: jtalk/url-health-check-action@v3 |
| 371 | + with: |
| 372 | + url: http://127.0.0.1:8082 |
| 373 | + max-attempts: 15 |
| 374 | + retry-delay: 30s |
| 375 | + |
| 376 | + - name: Run tests |
| 377 | + run: | |
| 378 | + cd extensions/intellij |
| 379 | + export DISPLAY=:99.0 |
| 380 | + ./gradlew test |
| 381 | +
|
| 382 | + - name: Move video |
| 383 | + if: ${{ failure() }} |
| 384 | + run: | |
| 385 | + cd extensions/intellij |
| 386 | + mv video build/reports |
| 387 | +
|
| 388 | + - name: Copy logs |
| 389 | + if: ${{ failure() }} |
| 390 | + run: | |
| 391 | + cd extensions/intellij |
| 392 | + mv build/idea-sandbox/system/log/ build/reports |
| 393 | +
|
| 394 | + - name: Save fails report |
| 395 | + if: ${{ failure() }} |
| 396 | + uses: actions/upload-artifact@v4 |
| 397 | + with: |
| 398 | + name: jb-failure-report |
| 399 | + path: | |
| 400 | + ${{ github.workspace }}/extensions/intellij/build/reports |
0 commit comments