-
Notifications
You must be signed in to change notification settings - Fork 0
Add GitHub Actions CI pipeline for automated testing #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4e5982e
381c1af
8f7edbd
ea9779e
f8ccc27
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 | ||
|
|
||
| - 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 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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`) | ||
|
||
| 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. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow uses
pythoninstead ofpython3. While this may work on ubuntu-latest wherepythonis aliased to Python 3, it's inconsistent with the repository's documented commands and could cause issues if the alias is not present. Should usepython3 test_all.pyor explicitly usepython3 -mpattern for consistency.