action fix #20
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 UI Tests | |
on: push | |
jobs: | |
run-ui-test: | |
name: run tests | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
prepareUI: | | |
export DISPLAY=:99.0 | |
Xvfb -ac :99 -screen 0 1920x1080x24 & | |
sleep 10 | |
mkdir -p build/reports | |
runTests: | | |
export DISPLAY=:99.0 | |
./gradlew :test | |
url: http://127.0.0.1:8082 | |
reportName: ui-test-fails-report-linux | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup Java | |
uses: actions/[email protected] | |
with: | |
distribution: zulu | |
java-version: 17 | |
- name: Setup FFmpeg | |
uses: FedericoCarboni/setup-ffmpeg@v2 | |
with: | |
# Not strictly necessary, but it may prevent rate limit | |
# errors especially on GitHub-hosted macos machines. | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Clean | |
run: ./gradlew :clean | |
- name: Prepare UI | |
run: ${{ matrix.prepareUI }} | |
- name: Run tests | |
run: ${{ matrix.runTests }} | |
- name: Move video | |
if: ${{ failure() }} | |
run: mv video build/reports | |
- name: Wait for reports | |
if: always() | |
uses: jakejarvis/wait-action@master | |
with: | |
time: '10s' | |
- name: Save reports | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.reportName }} | |
path: | | |
build/reports |