-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (61 loc) · 2.36 KB
/
Copy pathci.yml
File metadata and controls
73 lines (61 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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.15
with:
version: stable
# racket/gui initializes Gtk when required, so even logic tests need a
# display on Linux. Install Xvfb before any test runs.
- name: Install xvfb (Linux only)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y xvfb
- name: Install package and dependencies
# raco pkg install rejects "." as a source (ending path element must be
# a package name); the checkout directory name IS the package name.
run: raco pkg install --auto --no-docs "$PWD"
- 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
run: raco make main.rkt examples/*.rkt
- name: Test (logic + contracts)
env:
RUNNER_OS: ${{ runner.os }}
run: bash test/run-pure.sh
- name: Instantiate examples under raco test (catalog-build simulation)
# Mirrors what the package catalog build (DrDr) runs: each example is
# instantiated WITHOUT running its `main` submodule. Guards the
# convention that launch code lives in (module+ main ...); a top-level
# show or an armed timer would time out here and on the catalog build.
env:
RUNNER_OS: ${{ runner.os }}
run: bash test/run-examples.sh
- 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