1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-11 22:24:13 +01:00
Arduino/.github/workflows/ant.yml
Thomas L. Kjeldsen b4e5a8f7de Run tests with an X virtual framebuffer (1024x768)
The GitHub-hosted runner is a virtual machine hosted by GitHub.

Xvfb on that setup defaults to a virtual screen size of 640x480
(XVFBARGS='-screen 0 640x480x16') which in turn makes the Arduino user
interface tests fail with exceptions like this:

    [junit] org.fest.swing.exception.ActionFailedException: The component to click is out of the boundaries of the screen
    [junit] 	at org.fest.swing.exception.ActionFailedException.actionFailure(ActionFailedException.java:33)
    [junit] 	at org.fest.swing.core.RobotEventGenerator.pressMouse(RobotEventGenerator.java:74)

Setting the xvfb screen size to 1024x768 solves this error.
2020-01-31 12:52:27 +01:00

28 lines
632 B
YAML

name: Java CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Ant
working-directory: ./build
run: |
sed -i 's#<input .*/>##' build.xml
ant clean dist
- name: Install X virtual framebuffer
run: sudo apt-get install -y xvfb
- name: Run tests
working-directory: ./app
run: xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" ant test
- name: Cleanup xvfb
uses: bcomnes/cleanup-xvfb@v1