Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Test Suite

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
name: Run Test Suite
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc g++ build-essential

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install proto-schema-parser structured-classes

- name: Install Node.js dependencies
run: npm ci

- name: Run test suite
run: python test_all.py
Comment on lines +38 to +45

Copilot AI Nov 6, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow uses python instead of python3. While this may work on ubuntu-latest where python is aliased to Python 3, it's inconsistent with the repository's documented commands and could cause issues if the alias is not present. Should use python3 test_all.py or explicitly use python3 -m pattern for consistency.

Suggested change
python -m pip install --upgrade pip
pip install proto-schema-parser structured-classes
- name: Install Node.js dependencies
run: npm ci
- name: Run test suite
run: python test_all.py
python3 -m pip install --upgrade pip
pip3 install proto-schema-parser structured-classes
- name: Install Node.js dependencies
run: npm ci
- name: Run test suite
run: python3 test_all.py

Copilot uses AI. Check for mistakes.

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
tests/generated/
tests/c/*.bin
tests/cpp/*.bin
tests/py/*.bin
retention-days: 5
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,22 @@ python tests/run_tests.py --generate-only

See `tests/README.md` for detailed test documentation.

### Continuous Integration

The project uses GitHub Actions to automatically run the full test suite on:
- Every push to the `main` branch
- Every pull request targeting the `main` branch

The CI pipeline:
1. Sets up Python 3.11 and Node.js 20
2. Installs system dependencies (GCC, G++)
3. Installs Python dependencies (proto-schema-parser, structured-classes)
4. Installs Node.js dependencies
5. Runs the complete test suite (`python test_all.py`)

Copilot AI Nov 6, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation states the CI runs python test_all.py, but according to the repository structure and coding guidelines, the correct command should be python3 test_all.py for consistency with other Python commands used throughout the project (e.g., line 20: PYTHONPATH=src python3 src/main.py).

Copilot uses AI. Check for mistakes.
6. Uploads test artifacts for debugging

You can view test results in the "Actions" tab of the GitHub repository. Test artifacts (generated code and binary files) are available for download for 5 days after each run.

## Framing System

Struct Frame provides a message framing system for reliable communication over serial links, network sockets, or any byte stream. Framing solves the fundamental problem of determining where messages begin and end in a continuous data stream.
Expand Down