2021-09-30 12:44:19 +00:00
|
|
|
# GitHub Actions Workflow for launching UI tests on Linux, Windows, and Mac in the following steps:
|
2023-08-07 13:36:00 +00:00
|
|
|
# - Prepare and launch IDE with your plugin and robot-server plugin, which is needed to interact with the UI.
|
|
|
|
# - Wait for IDE to start.
|
|
|
|
# - Run UI tests with a separate Gradle task.
|
2021-06-08 20:58:04 +00:00
|
|
|
#
|
2023-08-07 13:36:00 +00:00
|
|
|
# Please check https://github.com/JetBrains/intellij-ui-test-robot for information about UI tests with IntelliJ Platform.
|
2021-06-08 20:58:04 +00:00
|
|
|
#
|
2021-04-07 10:08:14 +00:00
|
|
|
# Workflow is triggered manually.
|
|
|
|
|
|
|
|
name: Run UI Tests
|
|
|
|
on:
|
|
|
|
workflow_dispatch
|
|
|
|
|
2021-06-08 20:58:04 +00:00
|
|
|
jobs:
|
2021-04-07 10:08:14 +00:00
|
|
|
|
2021-06-08 20:58:04 +00:00
|
|
|
testUI:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: ubuntu-latest
|
|
|
|
runIde: |
|
|
|
|
export DISPLAY=:99.0
|
|
|
|
Xvfb -ac :99 -screen 0 1920x1080x16 &
|
|
|
|
gradle runIdeForUiTests &
|
|
|
|
- os: windows-latest
|
|
|
|
runIde: start gradlew.bat runIdeForUiTests
|
|
|
|
- os: macos-latest
|
|
|
|
runIde: ./gradlew runIdeForUiTests &
|
2021-04-07 10:08:14 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
|
2024-06-19 15:31:08 +00:00
|
|
|
# Check out the current repository
|
2021-08-31 07:04:03 +00:00
|
|
|
- name: Fetch Sources
|
2023-09-05 06:17:09 +00:00
|
|
|
uses: actions/checkout@v4
|
2021-08-31 07:04:03 +00:00
|
|
|
|
2023-08-07 13:20:46 +00:00
|
|
|
# Set up Java environment for the next steps
|
2021-04-07 10:08:14 +00:00
|
|
|
- name: Setup Java
|
2023-11-30 06:30:47 +00:00
|
|
|
uses: actions/setup-java@v4
|
2021-04-07 10:08:14 +00:00
|
|
|
with:
|
2021-06-08 20:58:04 +00:00
|
|
|
distribution: zulu
|
2023-04-26 11:13:57 +00:00
|
|
|
java-version: 17
|
2023-07-10 14:55:15 +00:00
|
|
|
|
|
|
|
# Setup Gradle
|
|
|
|
- name: Setup Gradle
|
2024-02-02 22:45:15 +00:00
|
|
|
uses: gradle/actions/setup-gradle@v3
|
2023-08-04 09:58:42 +00:00
|
|
|
with:
|
|
|
|
gradle-home-cache-cleanup: true
|
2021-04-07 10:08:14 +00:00
|
|
|
|
|
|
|
# Run IDEA prepared for UI testing
|
2021-06-08 20:58:04 +00:00
|
|
|
- name: Run IDE
|
|
|
|
run: ${{ matrix.runIde }}
|
|
|
|
|
|
|
|
# Wait for IDEA to be started
|
|
|
|
- name: Health Check
|
2024-05-29 15:35:13 +00:00
|
|
|
uses: jtalk/url-health-check-action@v4
|
2021-04-07 10:08:14 +00:00
|
|
|
with:
|
|
|
|
url: http://127.0.0.1:8082
|
|
|
|
max-attempts: 15
|
|
|
|
retry-delay: 30s
|
2021-09-06 08:33:23 +00:00
|
|
|
|
|
|
|
# Run tests
|
|
|
|
- name: Tests
|
|
|
|
run: ./gradlew test
|