update ci #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run JB UI tests | |
on: | |
push: | |
branches: | |
- pe/jb-integration-testing | |
defaults: | |
run: | |
working-directory: extensions/intellij | |
jobs: | |
run-ui-test: | |
name: run tests for ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# - os: ubuntu-latest | |
# runIde: | | |
# export DISPLAY=:99.0 | |
# Xvfb -ac :99 -screen 0 1920x1080x24 & | |
# sleep 10 | |
# mkdir -p build/reports | |
# ./gradlew runIdeForUiTests > build/reports/idea.log & | |
# runTests: | | |
# export DISPLAY=:99.0 | |
# ./gradlew test | |
# url: http://127.0.0.1:8082 | |
# reportName: ui-test-fails-report-linux | |
- os: macOS-latest | |
runIde: ./gradlew runIdeForUiTests & | |
runTests: ./gradlew test | |
url: http://127.0.0.1:8082 | |
reportName: ui-test-fails-report-mac | |
- os: windows-latest | |
runIde: start gradlew.bat :ui-test-example:runIdeForUiTests | |
runTests: ./gradlew :ui-test-example:test | |
url: http://localhost:8082 | |
reportName: ui-test-fails-report-windows | |
# - os: windows-latest | |
# runIde: start gradlew.bat runIdeForUiTests | |
# runTests: ./gradlew test | |
# url: http://localhost:8082 | |
# reportName: ui-test-fails-report-windows | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/[email protected] | |
- name: Install and enable do not disturb for macOS | |
if: runner.os == 'macOS' | |
run: | | |
npm install --global do-not-disturb-cli | |
do-not-disturb on | |
- name: Setup Java | |
uses: actions/[email protected] | |
with: | |
distribution: zulu | |
java-version: 17 | |
- name: Setup FFmpeg | |
uses: AnimMouse/setup-ffmpeg@v1 | |
with: | |
# Not strictly necessary, but it may prevent rate limit | |
# errors especially on GitHub-hosted macos machines. | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
gradle-home-cache-cleanup: true | |
- name: Use Node.js from .nvmrc | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
- name: Install core node_modules | |
run: | | |
cd ../../core | |
npm ci | |
# npm install gui | |
- name: Install gui node_modules and build | |
run: | | |
cd ../../gui | |
npm ci | |
npm run build | |
# Run prepackage.js script | |
- name: Run prepackage script | |
run: | | |
cd ../../extensions/vscode | |
npm ci | |
npm run prepackage | |
env: | |
# https://github.com/microsoft/vscode-ripgrep/issues/9#issuecomment-643965333 | |
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }} | |
# npm install binary | |
- name: Install binary node_modules | |
run: | | |
cd ../../binary | |
npm ci | |
# Build binaries | |
- name: Build the binaries | |
run: | | |
cd ../../binary | |
npm run build | |
- name: Run IDE | |
run: ${{ matrix.runIde }} | |
- name: Wait for JB connection | |
uses: jtalk/url-health-check-action@v3 | |
with: | |
url: ${{ matrix.url }} | |
max-attempts: 15 | |
retry-delay: 30s | |
- name: Run tests | |
run: ${{ matrix.runTests }} | |
- name: Move video | |
if: ${{ failure() }} | |
run: mv video build/reports | |
- name: Copy logs | |
if: ${{ failure() }} | |
run: mv build/idea-sandbox/system/log/ build/reports | |
- name: Save fails report | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.reportName }} | |
path: | | |
${{ github.workspace }}/extensions/intellij/build/reports |