fix(v0.83.1): Resolve TypeScript transpilation issues #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Frame Tests | |
on: | |
push: | |
branches: [ main, develop, v0.30 ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
inputs: | |
languages: | |
description: 'Languages to test (space-separated)' | |
required: false | |
default: 'python typescript' | |
categories: | |
description: 'Test categories (space-separated or "all")' | |
required: false | |
default: 'all' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
language: [python, typescript] | |
category: [core, control_flow, data_types, operators, scoping, systems] | |
fail-fast: false | |
name: Test ${{ matrix.language }} - ${{ matrix.category }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Cache Rust dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build Frame Transpiler | |
run: cargo build --release | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Set up Node.js (for TypeScript) | |
if: matrix.language == 'typescript' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install TypeScript | |
if: matrix.language == 'typescript' | |
run: npm install -g typescript | |
- name: Run Tests | |
run: | | |
python3 framec_tests/runner/frame_test_runner.py \ | |
--languages ${{ matrix.language }} \ | |
--categories ${{ matrix.category }} \ | |
--framec ./target/release/framec \ | |
--transpile-only \ | |
--verbose | |
- name: Upload Test Results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-results-${{ matrix.language }}-${{ matrix.category }} | |
path: framec_tests/reports/ | |
test-summary: | |
runs-on: ubuntu-latest | |
needs: test | |
if: always() | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Download all artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: test-artifacts | |
- name: Generate Summary Report | |
run: | | |
echo "# Frame Test Results Summary" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "## Test Matrix Results" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
# Count results | |
TOTAL_TESTS=0 | |
PASSED_TESTS=0 | |
for dir in test-artifacts/*/; do | |
if [ -d "$dir" ]; then | |
LANG_CAT=$(basename "$dir" | sed 's/test-results-//') | |
echo "- **$LANG_CAT**: ✓" >> $GITHUB_STEP_SUMMARY | |
fi | |
done | |
echo "" >> $GITHUB_STEP_SUMMARY | |
echo "## Coverage" >> $GITHUB_STEP_SUMMARY | |
echo "- Common Tests: 432" >> $GITHUB_STEP_SUMMARY | |
echo "- Language-Specific: 29 (Python)" >> $GITHUB_STEP_SUMMARY | |
echo "- Total: 461" >> $GITHUB_STEP_SUMMARY | |
regression-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Build Frame Transpiler | |
run: cargo build --release | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Run Regression Tests | |
run: | | |
python3 framec_tests/runner/frame_test_runner.py \ | |
--languages python \ | |
--categories regression negative \ | |
--framec ./target/release/framec \ | |
--verbose | |
- name: Check for Regressions | |
if: failure() | |
run: | | |
echo "::error::Regression tests failed! Check the logs for details." | |
exit 1 |