Skip to content

v0.7.1: behavioral test suite (real widget logic, under Xvfb in CI) #7

v0.7.1: behavioral test suite (real widget logic, under Xvfb in CI)

v0.7.1: behavioral test suite (real widget logic, under Xvfb in CI) #7

Workflow file for this run

name: CI
on:
push:
branches: [master, main]
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Racket
uses: Bogdanp/setup-racket@v1
with:
version: stable
- name: Install package and dependencies
run: raco pkg install --auto --no-docs .
- name: Install formatter
run: raco pkg install --auto --no-docs fmt
- name: Check formatting
# Fail if any file is not raco-fmt clean.
run: bash test/check-fmt.sh
- name: Compile
# Compiling GUI modules does not open a display, so this is safe headless.
run: raco make main.rkt examples/*.rkt
- name: Test
# Logic tests only; they do not instantiate any window.
run: raco test test/run.rkt
- name: Install xvfb (Linux only)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y xvfb
- name: Smoke-test that every example launches
# Catches runtime errors raco make cannot (bad callback arity, missing
# method, broken paint). Pass = window opened, killed by timeout (124).
env:
RUNNER_OS: ${{ runner.os }}
run: bash test/smoke-examples.sh
- name: Run GUI behavioral tests
# Real behavior (clamping, append/trim, show/hide). Needs a display;
# run-gui-behavior.sh wraps it in Xvfb on headless Linux.
env:
RUNNER_OS: ${{ runner.os }}
run: bash test/run-gui-behavior.sh