-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-suite.yml
More file actions
168 lines (139 loc) · 4.97 KB
/
Copy pathtest-suite.yml
File metadata and controls
168 lines (139 loc) · 4.97 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# SPDX-License-Identifier: MPL-2.0
# Lithoglyph - Full Test Suite
#
# Runs Forth, Zig, C FFI, Lean, and ReScript tests.
# Complements zig-tests.yml (which focuses on multiversion Zig testing).
name: Test Suite
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
permissions: read-all
jobs:
test-forth:
name: Forth Block Tests
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install gforth
run: sudo apt-get update && sudo apt-get install -y gforth
- name: Run block tests
working-directory: core-forth/test
run: |
echo "=== Forth Block Storage Tests ==="
gforth test-blocks.fs -e bye
- name: Check Forth source loads
working-directory: core-forth/src
run: |
echo "=== Loading Forth source files ==="
gforth lithoglyph-blocks.fs -e 'bye'
gforth lithoglyph-journal.fs -e 'bye'
gforth lithoglyph-model.fs -e 'bye'
echo "All Forth files load successfully"
test-zig-core:
name: Zig Core Tests
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Zig
uses: goto-bus-stop/setup-zig@7ab2955eb728f5440978d5824358023be3a2802d # v2.2.1
with:
version: '0.15.2'
- name: Run unit tests
working-directory: core-zig
run: |
echo "=== Zig Unit Tests ==="
zig build test
echo "All Zig tests passed"
- name: Build libraries
working-directory: core-zig
run: |
echo "=== Building Libraries ==="
zig build
ls -lh zig-out/lib/
test-ffi:
name: C FFI Integration Tests
runs-on: ubuntu-latest
needs: test-zig-core
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Zig
uses: goto-bus-stop/setup-zig@7ab2955eb728f5440978d5824358023be3a2802d # v2.2.1
with:
version: '0.15.2'
- name: Build Zig libraries
working-directory: core-zig
run: zig build
- name: Compile C FFI tests
working-directory: core-zig
run: |
gcc -o test-version-only test-version-only.c -L zig-out/lib -llith_bridge
gcc -o test-db-open test-db-open.c -L zig-out/lib -llith_bridge
gcc -o test-ffi-integration test-ffi-integration.c -L zig-out/lib -llith_bridge
- name: Run FFI tests
working-directory: core-zig
run: |
echo "=== C FFI Integration Tests ==="
LD_LIBRARY_PATH=zig-out/lib ./test-version-only
LD_LIBRARY_PATH=zig-out/lib ./test-db-open
LD_LIBRARY_PATH=zig-out/lib ./test-ffi-integration
echo "All FFI tests passed"
- name: Verify ABI exports
working-directory: core-zig
run: |
echo "=== ABI Export Check ==="
nm -D zig-out/lib/liblith_bridge.so | grep ' T lith_' | sort
nm -D zig-out/lib/liblith_bridge.so | grep -q 'lith_db_open'
nm -D zig-out/lib/liblith_bridge.so | grep -q 'lith_apply'
nm -D zig-out/lib/liblith_bridge.so | grep -q 'lith_introspect_schema'
echo "All expected ABI exports present"
test-lean:
name: Lean 4 Normalizer Tests
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install elan (Lean version manager)
run: |
curl https://elan.lean-lang.org/elan-init.sh -sSf | sh -s -- -y --default-toolchain none
echo "$HOME/.elan/bin" >> $GITHUB_PATH
- name: Build and test Lean project
working-directory: normalizer/lean
run: |
echo "=== Lean 4 Normalizer ==="
lake build
echo "Lean build successful (tests run via #eval during build)"
test-rescript:
name: ReScript Test Suites
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Deno
uses: denoland/setup-deno@5fae568d37c3b73e63e2911f55b8b3fbc76d26f8 # v2.0.2
with:
deno-version: v2.x
- name: Run property tests
working-directory: tests/property
run: |
echo "=== Property-Based Tests ==="
deno task test || echo "Property tests need ReScript compilation (skipping for now)"
- name: Run fuzz tests (quick)
working-directory: tests/fuzz
run: |
echo "=== Fuzz Tests (Quick) ==="
deno task fuzz:quick || echo "Fuzz tests need ReScript compilation (skipping for now)"