From 23491d407b689b4bede344e87882537290b3303f Mon Sep 17 00:00:00 2001 From: Vitaly Date: Wed, 24 Aug 2022 10:32:06 +0300 Subject: [PATCH] Create run-ui-tests.yml --- .github/workflows/run-ui-tests.yml | 59 ++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/run-ui-tests.yml diff --git a/.github/workflows/run-ui-tests.yml b/.github/workflows/run-ui-tests.yml new file mode 100644 index 0000000..1e4456d --- /dev/null +++ b/.github/workflows/run-ui-tests.yml @@ -0,0 +1,59 @@ +# GitHub Actions Workflow for launching UI tests on Linux, Windows, and Mac in the following steps: +# - prepare and launch IDE with your plugin and robot-server plugin, which is needed to interact with UI +# - wait for IDE to start +# - run UI tests with separate Gradle task +# +# Please check https://github.com/JetBrains/intellij-ui-test-robot for information about UI tests with IntelliJ Platform +# +# Workflow is triggered manually. + +name: Run UI Tests +on: + workflow_dispatch + +jobs: + + 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 & + + steps: + + # Check out current repository + - name: Fetch Sources + uses: actions/checkout@v3 + + # Setup Java 11 environment for the next steps + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: zulu + java-version: 11 + + # Run IDEA prepared for UI testing + - name: Run IDE + run: ${{ matrix.runIde }} + + # Wait for IDEA to be started + - name: Health Check + uses: jtalk/url-health-check-action@v2 + with: + url: http://127.0.0.1:8082 + max-attempts: 15 + retry-delay: 30s + + # Run tests + - name: Tests + run: ./gradlew test