Skip to content

Commit 6bdadaa

Browse files
committed
add all tests in one starter
1 parent 8dd084a commit 6bdadaa

File tree

2 files changed

+382
-43
lines changed

2 files changed

+382
-43
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -248,40 +248,14 @@ jobs:
248248
restore-keys: |
249249
${{ runner.os }}-zig-${{ env.ZIG_VERSION }}-
250250
251-
- name: Build examples
251+
- name: Build and test examples
252252
shell: bash
253253
run: |
254-
echo "📚 Building examples..."
255-
zig build
256-
257-
# Check if examples directory exists
258-
if [ -d "examples" ]; then
259-
echo "🔍 Found examples directory"
260-
find examples/ -name "*.ora" -exec echo "📄 Found example: {}" \;
261-
262-
# Try to compile each .ora file (if we have a compiler binary)
263-
if [ -f "zig-out/bin/ora" ]; then
264-
echo "🚀 Testing compiler on examples..."
265-
266-
# Run general examples test
267-
if [ -f "scripts/test-examples.sh" ]; then
268-
echo "📜 Running test-examples.sh script..."
269-
./scripts/test-examples.sh || echo "⚠️ Some examples failed via test script"
270-
else
271-
echo "ℹ️ No test-examples.sh script found, trying manual compilation..."
272-
find examples/ -name "*.ora" -exec echo "Compiling: {}" \; -exec ./zig-out/bin/ora {} \; || echo "⚠️ Some examples failed to compile"
273-
fi
274-
else
275-
echo "ℹ️ No compiler binary found, skipping example compilation"
276-
fi
277-
else
278-
echo "ℹ️ No examples directory found"
279-
fi
280-
281-
echo "✅ Examples processing completed"
254+
echo "🧪 Running unified test suite..."
255+
./scripts/test-all.sh -q all
282256
283-
struct-tests:
284-
name: Struct Implementation Tests
257+
comprehensive-tests:
258+
name: Comprehensive Feature Tests
285259
runs-on: ${{ matrix.os }}
286260
needs: [lint, test]
287261

@@ -343,17 +317,11 @@ jobs:
343317
restore-keys: |
344318
${{ runner.os }}-zig-${{ env.ZIG_VERSION }}-
345319
346-
- name: Run struct tests
347-
shell: bash
348-
run: |
349-
echo "🏗️ Running comprehensive struct tests..."
350-
./scripts/test-struct-examples.sh
351-
352-
- name: Run struct performance benchmarks
320+
- name: Run comprehensive tests
353321
shell: bash
354322
run: |
355-
echo "Running struct performance benchmarks..."
356-
./scripts/test-struct-examples.sh --benchmark
323+
echo "🏗️ Running comprehensive tests..."
324+
./scripts/test-all.sh struct enum core advanced
357325
358326
- name: Upload test results
359327
uses: actions/upload-artifact@v4
@@ -495,7 +463,7 @@ jobs:
495463
name: Release Check
496464
runs-on: ubuntu-latest
497465
if: github.ref == 'refs/heads/main'
498-
needs: [lint, test, examples, struct-tests, security]
466+
needs: [lint, test, examples, comprehensive-tests, security]
499467

500468
steps:
501469
- name: Checkout code
@@ -573,11 +541,11 @@ jobs:
573541
name: Notification
574542
runs-on: ubuntu-latest
575543
if: always()
576-
needs: [lint, test, examples, struct-tests, security]
544+
needs: [lint, test, examples, comprehensive-tests, security]
577545

578546
steps:
579547
- name: Notify on success
580-
if: needs.lint.result == 'success' && needs.test.result == 'success' && needs.examples.result == 'success' && needs.struct-tests.result == 'success'
548+
if: needs.lint.result == 'success' && needs.test.result == 'success' && needs.examples.result == 'success' && needs.comprehensive-tests.result == 'success'
581549
run: |
582550
echo "✅ 🎉 All CI checks passed successfully!"
583551
echo "📊 Results:"

0 commit comments

Comments
 (0)