Skip to content

Add MicroPython Board Comparison Tool - libcst-Based Multi-View Web Explorer with Shareable Links, Multi-Version Support, and CI/CD Testing #40

Add MicroPython Board Comparison Tool - libcst-Based Multi-View Web Explorer with Shareable Links, Multi-Version Support, and CI/CD Testing

Add MicroPython Board Comparison Tool - libcst-Based Multi-View Web Explorer with Shareable Links, Multi-Version Support, and CI/CD Testing #40

name: Test Board Comparison Tools
on:
pull_request:
paths:
- 'tools/board_compare/**'
- '.github/workflows/test_board_comparison.yml'
push:
branches:
- main
paths:
- 'tools/board_compare/**'
- '.github/workflows/test_board_comparison.yml'
workflow_dispatch:
jobs:
test-board-compare:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pydantic libcst pytest
- name: Run simple tests
working-directory: tools/board_compare
run: |
python test_tool.py
- name: Run pytest tests
working-directory: tools/board_compare
continue-on-error: true
run: |
pytest -v --tb=short
- name: Run unified test suite
working-directory: tools/board_compare
run: |
python run_tests.py
- name: Test database build (dry run)
working-directory: tools/board_compare
continue-on-error: true
run: |
# Test that the build_database script can be imported and has no syntax errors
python -c "from build_database import DatabaseBuilder; print('✓ build_database.py imports successfully')"
- name: Test stub scanner (dry run)
working-directory: tools/board_compare
continue-on-error: true
run: |
# Test that the scan_stubs script can be imported and has no syntax errors
python -c "from scan_stubs import StubScanner; print('✓ scan_stubs.py imports successfully')"
- name: Verify models
working-directory: tools/board_compare
run: |
python -c "from models import Parameter, Method, Class, Module, Board; print('✓ All models import successfully')"
- name: Test Summary
if: always()
run: |
echo "================================================"
echo "Board Comparison Tool Test Results"
echo "================================================"
echo "All tests completed. Check logs above for details."