Skip to content

Commit 8393cfd

Browse files
Update pr_checks.yaml
1 parent 526eeee commit 8393cfd

File tree

1 file changed

+59
-34
lines changed

1 file changed

+59
-34
lines changed

.github/workflows/pr_checks.yaml

+59-34
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
102102

103103
install-gui:
104-
needs: [install-root, install-core]
104+
needs: [ install-root, install-core ]
105105
runs-on: ubuntu-latest
106106
steps:
107107
- uses: actions/checkout@v4
@@ -164,7 +164,7 @@ jobs:
164164
npx tsc --noEmit
165165
166166
binary-checks:
167-
needs: [install-root, install-core]
167+
needs: [ install-root, install-core ]
168168
runs-on: ubuntu-latest
169169
steps:
170170
- uses: actions/checkout@v4
@@ -201,7 +201,7 @@ jobs:
201201
npx tsc --noEmit
202202
203203
install-vscode:
204-
needs: [install-root, install-core]
204+
needs: [ install-root, install-core ]
205205
runs-on: ubuntu-latest
206206
steps:
207207
- uses: actions/checkout@v4
@@ -294,7 +294,7 @@ jobs:
294294

295295
vscode-get-test-file-matrix:
296296
runs-on: ubuntu-latest
297-
needs: [install-root, install-vscode]
297+
needs: [ install-root, install-vscode ]
298298
outputs:
299299
test_file_matrix: ${{ steps.vscode-get-test-file-matrix.outputs.test_file_matrix }}
300300
steps:
@@ -323,7 +323,7 @@ jobs:
323323
324324
vscode-package-extension:
325325
runs-on: ubuntu-latest
326-
needs: [install-vscode, install-core]
326+
needs: [ install-vscode, install-core ]
327327
steps:
328328
- uses: actions/checkout@v4
329329

@@ -356,7 +356,7 @@ jobs:
356356

357357
vscode-download-e2e-dependencies:
358358
runs-on: ubuntu-latest
359-
needs: [install-vscode, install-core]
359+
needs: [ install-vscode, install-core ]
360360
steps:
361361
- uses: actions/checkout@v4
362362

@@ -404,7 +404,7 @@ jobs:
404404
fail-fast: false
405405
matrix:
406406
test_file: ${{ fromJson(needs.vscode-get-test-file-matrix.outputs.test_file_matrix) }}
407-
command: ["e2e:ci:run", "e2e:ci:run-yaml"]
407+
command: [ "e2e:ci:run", "e2e:ci:run-yaml" ]
408408
steps:
409409
- uses: actions/checkout@v4
410410

@@ -467,7 +467,7 @@ jobs:
467467
path: extensions/vscode/e2e/storage/screenshots
468468

469469
gui-tests:
470-
needs: [install-gui, install-core]
470+
needs: [ install-gui, install-core ]
471471
runs-on: ubuntu-latest
472472
steps:
473473
- uses: actions/checkout@v4
@@ -498,11 +498,48 @@ jobs:
498498
cd gui
499499
npm test
500500
501+
501502
jetbrains-tests:
502-
needs: [install-root, core-checks]
503-
runs-on: ubuntu-latest
503+
needs: [ install-root, core-checks ]
504+
strategy:
505+
fail-fast: false
506+
matrix:
507+
os: [ ubuntu-latest, windows-latest ]
508+
include:
509+
- os: ubuntu-latest
510+
runIde: |
511+
export DISPLAY=:99.0
512+
Xvfb -ac :99 -screen 0 1920x1080x24 &
513+
sleep 10
514+
mkdir -p extensions/intellij/build/reports
515+
./gradlew runIdeForUiTests &
516+
runTests: |
517+
export DISPLAY=:99.0
518+
./gradlew test
519+
url: http://127.0.0.1:8082
520+
reportName: jb-failure-report-linux
521+
shell: bash
522+
moveVideo: mv extensions/intellij/video extensions/intellij/build/reports
523+
copyLogs: mv extensions/intellij/build/idea-sandbox/system/log/ extensions/intellij/build/reports
524+
reportsPath: extensions/intellij/build/reports
525+
526+
- os: windows-latest
527+
runIde: |
528+
set DISPLAY=:99.0
529+
start /B gradlew.bat runIdeForUiTests
530+
mkdir extensions\intellij\build\reports
531+
runTests: |
532+
./gradlew test
533+
url: http://localhost:8082
534+
reportName: jb-failure-report-windows
535+
shell: pwsh
536+
moveVideo: Move-Item extensions\intellij\video extensions\intellij\build\reports
537+
copyLogs: Move-Item extensions\intellij\build\idea-sandbox\system\log\ extensions\intellij\build\reports
538+
reportsPath: extensions\intellij\build\reports
539+
runs-on: ${{ matrix.os }}
504540
steps:
505541
- uses: actions/checkout@v4
542+
506543
- uses: actions/cache@v4
507544
with:
508545
path: core/node_modules
@@ -533,7 +570,6 @@ jobs:
533570
path: gui/node_modules
534571
key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }}
535572

536-
# We can shave off another minute off our CI script by finding a way to share this with vscode-tests
537573
- name: Run prepackage script
538574
run: |
539575
cd extensions/vscode
@@ -554,48 +590,37 @@ jobs:
554590
cd binary
555591
npm run build
556592
557-
- name: Start test IDE
558-
run: |
559-
cd extensions/intellij
560-
export DISPLAY=:99.0
561-
Xvfb -ac :99 -screen 0 1920x1080x24 &
562-
sleep 10
563-
mkdir -p build/reports
564-
./gradlew runIdeForUiTests &
593+
- name: Run IDE
594+
shell: ${{ matrix.shell }}
595+
run: ${{ matrix.runIde }}
565596

566597
- name: Wait for JB connection
567598
uses: jtalk/url-health-check-action@v3
568599
with:
569-
url: http://127.0.0.1:8082
600+
url: ${{ matrix.url }}
570601
max-attempts: 15
571602
retry-delay: 30s
572603

573604
- name: Run tests
574-
run: |
575-
cd extensions/intellij
576-
export DISPLAY=:99.0
577-
./gradlew test
605+
shell: ${{ matrix.shell }}
606+
run: ${{ matrix.runTests }}
578607

579608
- name: Move video
580609
if: ${{ failure() }}
581-
run: |
582-
cd extensions/intellij
583-
mv video build/reports
610+
shell: ${{ matrix.shell }}
611+
run: ${{ matrix.moveVideo }}
584612

585613
- name: Copy logs
586614
if: ${{ failure() }}
587-
run: |
588-
cd extensions/intellij
589-
mv build/idea-sandbox/system/log/ build/reports
615+
shell: ${{ matrix.shell }}
616+
run: ${{ matrix.copyLogs }}
590617

591618
- name: Save fails report
592619
if: ${{ failure() }}
593620
uses: actions/upload-artifact@v4
594621
with:
595-
name: jb-failure-report
596-
path: |
597-
${{ github.workspace }}/extensions/intellij/build/reports
598-
622+
name: ${{ matrix.reportName }}
623+
path: ${{ matrix.reportsPath }}
599624
# GitHub does not have a way of requiring that all checks pass (you must manually select each job)
600625
# This action at least lets us manage the list of required tests via source control
601626
# so that creators of new jobs can add them to this list

0 commit comments

Comments
 (0)