Skip to content

Commit

Permalink
ci: run ui tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nhedger committed Dec 16, 2023
1 parent 7e92106 commit 631a09c
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 1 deletion.
74 changes: 74 additions & 0 deletions .github/workflows/_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Reusable Test Workflow
name: _Test

on:
workflow_call:

jobs:
test-ui:
name: Test UI
runs-on: ${{ 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 editors/intellij/build/reports
./gradlew :runIdeForUiTests > editors/intellij/build/reports/idea.log &
runTests: |
export DISPLAY=:99.0
./gradlew :test
reportName: ui-test-fails-report-linux
- os: windows-latest
runIde: start gradlew.bat :runIdeForUiTests
runTests: ./gradlew :test
reportName: ui-test-fails-report-windows
- os: macos-latest
runIde: ./gradlew :runIdeForUiTests &
runTests: ./gradlew :test
reportName: ui-test-fails-report-mac

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install basic project fixture dependencies
working-directory: src/test/testData/basic-project
run: npm i

- name: Run IDE
run: ${{ matrix.runIde }}

# Wait for IDEA to be started
- name: Health Check
uses: jtalk/url-health-check-action@v3
with:
url: http://127.0.0.1:8082
max-attempts: 15
retry-delay: 30s

- name: Run
run: ${{ matrix.runTests }}

- name: Copy logs
if: ${{ failure() }}
run: mv ./build/idea-sandbox/system/log/ ./build/reports

- name: Save fails report
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.reportName }}
path: ./build/reports
5 changes: 4 additions & 1 deletion .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ on:
jobs:
build:
name: Build
uses: ./.github/workflows/_build.yaml
uses: ./.github/workflows/_build.yaml
test:
name: Test
uses: ./.github/workflows/_test.yaml

0 comments on commit 631a09c

Please sign in to comment.