1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2024-09-18 22:42:47 +02:00
IntelliJ-IdeaVim/.github/workflows/runUiTests.yml
Alex Plate b357625529
Add check that actions should work only on the original repo
Because of some reason actions started on
https://github.com/JetBrains/ideavim/pull/731
pull request and updated it.
With this change, forks won't be affected by forked actions. If the action is still needed on fork, these conditions can be changes
2023-10-27 10:33:26 +03:00

78 lines
2.3 KiB
YAML

name: Run UI Tests
on:
workflow_dispatch:
schedule:
- cron: '0 12 * * *'
jobs:
build-for-ui-test-mac-os:
if: github.repository == 'JetBrains/ideavim'
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v2.1.0
with:
distribution: zulu
java-version: 11
- name: Setup FFmpeg
uses: FedericoCarboni/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: Build Plugin
run: gradle :buildPlugin
- name: Run Idea
run: |
mkdir -p build/reports
gradle :runIdeForUiTests > build/reports/idea.log &
- name: Wait for Idea started
uses: jtalk/url-health-check-action@1.5
with:
url: http://127.0.0.1:8082
max-attempts: 20
retry-delay: 10s
- name: Tests
run: gradle :testUi
- name: Move video
if: ${{ failure() }}
run: mv video build/reports
- name: Save fails report
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: ui-test-fails-report-mac
path: |
build/reports
# build-for-ui-test-linux:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Setup Java
# uses: actions/setup-java@v2.1.0
# with:
# distribution: zulu
# java-version: 11
# - name: Build Plugin
# run: gradle :buildPlugin
# - name: Run Idea
# run: |
# export DISPLAY=:99.0
# Xvfb -ac :99 -screen 0 1920x1080x16 &
# mkdir -p build/reports
# gradle :runIdeForUiTests #> build/reports/idea.log
# - name: Wait for Idea started
# uses: jtalk/url-health-check-action@1.5
# with:
# url: http://127.0.0.1:8082
# max-attempts: 15
# retry-delay: 30s
# - name: Tests
# run: gradle :testUi
# - name: Save fails report
# if: ${{ failure() }}
# uses: actions/upload-artifact@v2
# with:
# name: ui-test-fails-report-linux
# path: |
# ui-test-example/build/reports