Repository navigation
183 lines (154 loc) · 6.82 KB
/
Copy pathtest.yml
File metadata and controls
183 lines (154 loc) · 6.82 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
# This workflow is managed by gh actions-lock.
name: Test
permissions: read-all
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
workflow_dispatch:
jobs:
test:
name: Test on Racket ${{ matrix.racket-version }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
racket-version: ['8.11', '8.12', 'current']
steps:
- name: Checkout code
uses: actions/checkout@v7.0.1
- name: Setup Racket
uses: Bogdanp/setup-racket@v1.15
with:
version: ${{ matrix.racket-version }}
# rackunit ships with the full Racket distribution (already present
# at installation scope); re-requesting it at user scope errors with
# "package is currently installed in a wider scope".
- name: Run core tests
run: racket tests/basics.rkt
- name: Run benchmarks
run: racket benchmarks/performance.rkt
continue-on-error: true # Benchmarks may vary by platform
- name: Test example files
run: |
racket examples/basic-tutorial.rkt
racket examples/monte-carlo.rkt
racket examples/game-theory.rkt
racket examples/finance.rkt
racket examples/probabilistic-structures.rkt
shell: bash
- name: Test library modules
run: |
racket -e '(require "lib/statistics.rkt")' -e '(displayln "statistics.rkt OK")'
racket -e '(require "lib/distributions.rkt")' -e '(displayln "distributions.rkt OK")'
racket -e '(require "lib/markov.rkt")' -e '(displayln "markov.rkt OK")'
racket -e '(require "lib/bayesian.rkt")' -e '(displayln "bayesian.rkt OK")'
racket -e '(require "lib/combinators.rkt")' -e '(displayln "combinators.rkt OK")'
racket -e '(require "lib/optimization.rkt")' -e '(displayln "optimization.rkt OK")'
racket -e '(require "lib/sampling.rkt")' -e '(displayln "sampling.rkt OK")'
racket -e '(require "lib/ternary.rkt")' -e '(displayln "ternary.rkt OK")'
shell: bash
- name: Test REPL startup
run: echo ':quit' | racket repl/shell.rkt
shell: bash
- name: Check for compilation warnings
run: raco setup --check-pkg-deps --no-docs betlang || true
continue-on-error: true
lint:
name: Code Quality
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v7.0.1
- name: Setup Racket
uses: Bogdanp/setup-racket@v1.15
with:
version: 'current'
- name: Check file formatting
run: |
find . -name "*.rkt" -type f | while read file; do
echo "Checking $file"
racket -l racket/base -e "(require syntax/parse)" "$file" 2>&1 || echo "Warning: $file may have issues"
done
shell: bash
continue-on-error: true
- name: Check for TODO comments
run: |
echo "=== TODO/FIXME/HACK comments found ==="
grep -r "TODO\|FIXME\|HACK" --include="*.rkt" . || echo "No TODO comments found"
shell: bash
continue-on-error: true
docs:
name: Documentation Check
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v7.0.1
- name: Check documentation completeness
run: |
echo "=== Checking required documentation files ==="
test -f README.md && echo "✓ README.md" || echo "✗ README.md missing"
test -f LICENSE && echo "✓ LICENSE" || echo "✗ LICENSE missing"
test -f CONTRIBUTING.md && echo "✓ CONTRIBUTING.md" || echo "✗ CONTRIBUTING.md missing"
test -f SECURITY.md && echo "✓ SECURITY.md" || echo "✗ SECURITY.md missing"
test -f CODE_OF_CONDUCT.md && echo "✓ CODE_OF_CONDUCT.md" || echo "✗ CODE_OF_CONDUCT.md missing"
test -f CHANGELOG.md && echo "✓ CHANGELOG.md" || echo "✗ CHANGELOG.md missing"
shell: bash
continue-on-error: true
- name: Check for broken links in markdown
run: |
echo "=== Checking for broken internal links ==="
grep -r "\[.*\](.*\.md)" --include="*.md" . | grep -v "http" || echo "No markdown links found"
shell: bash
continue-on-error: true
rsr-compliance:
name: RSR Framework Compliance
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v7.0.1
- name: Check RSR compliance
run: |
echo "=== RSR (Rhodium Standard Repository) Compliance Check ==="
echo ""
echo "📋 Documentation:"
test -f README.md && echo " ✓ README.md" || echo " ✗ README.md"
test -f LICENSE && echo " ✓ LICENSE" || echo " ✗ LICENSE"
test -f CONTRIBUTING.md && echo " ✓ CONTRIBUTING.md" || echo " ✗ CONTRIBUTING.md"
test -f SECURITY.md && echo " ✓ SECURITY.md" || echo " ✗ SECURITY.md"
test -f CODE_OF_CONDUCT.md && echo " ✓ CODE_OF_CONDUCT.md" || echo " ✗ CODE_OF_CONDUCT.md"
test -f MAINTAINERS.md && echo " ✓ MAINTAINERS.md" || echo " ✗ MAINTAINERS.md"
test -f CHANGELOG.md && echo " ✓ CHANGELOG.md" || echo " ✗ CHANGELOG.md"
echo ""
echo "🔒 Security:"
test -f .well-known/security.txt && echo " ✓ .well-known/security.txt" || echo " ✗ .well-known/security.txt"
test -f SECURITY.md && echo " ✓ Security policy" || echo " ✗ Security policy"
echo ""
echo "🤖 AI Policy:"
test -f .well-known/ai.txt && echo " ✓ .well-known/ai.txt" || echo " ✗ .well-known/ai.txt"
echo ""
echo "👥 Community:"
test -f .well-known/humans.txt && echo " ✓ .well-known/humans.txt" || echo " ✗ .well-known/humans.txt"
test -f TPCF.md && echo " ✓ TPCF declaration" || echo " ✗ TPCF declaration"
echo ""
echo "🧪 Testing:"
test -d tests && echo " ✓ Test directory exists" || echo " ✗ No tests directory"
test -f tests/basics.rkt && echo " ✓ Test suite present" || echo " ✗ No test suite"
echo ""
echo "🏗️ Build System:"
test -f info.rkt && echo " ✓ info.rkt package metadata" || echo " ✗ No package metadata"
test -f .gitignore && echo " ✓ .gitignore" || echo " ✗ No .gitignore"
echo ""
echo "=== Compliance Summary ==="
echo "For full RSR compliance, ensure all items above are present."
shell: bash
continue-on-error: true