Skip to content

Commit 9960257

Browse files
committed
Add SerDes conformance tests to CI/CD pipeline
This commit integrates the language-agnostic SerDes conformance tests into the GitHub Actions CI/CD pipeline. Changes to .github/workflows/main.yml: - Added new "test-serdes" job with matrix strategy [cpy314, cpy311, pypy311] - Job runs language-agnostic validation tests from wamp-proto/testsuite - Generates JUnit XML test reports for each Python environment - Uploads test results as verified artifacts using wamp-cicd actions - Added test-serdes as dependency for build-package job Changes to .github/workflows/release.yml: - Added download step for SerDes test results artifacts - Uses wamp-cicd/actions/download-artifact-verified with retry logic - Downloads all serdes-test-results-* artifacts from main workflow - Test results included in release artifacts Test Execution: - Runs: pytest -v examples/serdes/tests/test_publish.py test_event.py - Tests: 158 tests across 3 Python environments (474 total test runs) - Coverage: 35 PUBLISH.Options + 21 EVENT.Details validation tests - Output: JUnit XML reports + summary files Benefits: - Ensures language-agnostic test vectors pass on all Python versions - Blocks package build if conformance tests fail - Test results available as release artifacts - Foundation for adding AutobahnJS/Java/C++ to same test suite Related: #1764, wamp-proto#556
1 parent 7970856 commit 9960257

File tree

2 files changed

+114
-2
lines changed

2 files changed

+114
-2
lines changed

.github/workflows/main.yml

Lines changed: 90 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,94 @@ jobs:
126126
continue-on-error: true
127127
run: just test-asyncio cpy314 0
128128

129+
test-serdes:
130+
name: SerDes Conformance Tests
131+
needs: identifiers
132+
runs-on: ubuntu-24.04
133+
134+
env:
135+
BASE_REPO: ${{ needs.identifiers.outputs.base_repo }}
136+
BASE_BRANCH: ${{ needs.identifiers.outputs.base_branch }}
137+
PR_NUMBER: ${{ needs.identifiers.outputs.pr_number }}
138+
PR_REPO: ${{ needs.identifiers.outputs.pr_repo }}
139+
PR_BRANCH: ${{ needs.identifiers.outputs.pr_branch }}
140+
141+
strategy:
142+
matrix:
143+
python-env: [cpy314, cpy311, pypy311]
144+
145+
steps:
146+
- name: Checkout code
147+
uses: actions/checkout@v4
148+
with:
149+
submodules: recursive
150+
151+
- name: Install Just
152+
env:
153+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
154+
run: |
155+
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to ~/bin
156+
echo "$HOME/bin" >> $GITHUB_PATH
157+
158+
- name: Install uv
159+
env:
160+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
161+
run: |
162+
curl -LsSf https://astral.sh/uv/install.sh | sh
163+
source $HOME/.cargo/env
164+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
165+
166+
- name: Verify toolchain installation
167+
run: |
168+
just --version
169+
uv --version
170+
171+
- name: Setup uv cache
172+
uses: actions/cache@v4
173+
with:
174+
path: ${{ env.UV_CACHE_DIR }}
175+
key:
176+
uv-cache-ubuntu-serdes-${{ matrix.python-env }}-${{
177+
hashFiles('pyproject.toml') }}
178+
restore-keys: |
179+
uv-cache-ubuntu-serdes-${{ matrix.python-env }}-
180+
uv-cache-ubuntu-serdes-
181+
182+
- name: Create Python environment
183+
run: |
184+
just create ${{ matrix.python-env }}
185+
just install-tools ${{ matrix.python-env }}
186+
187+
- name: Run SerDes conformance tests
188+
run: |
189+
echo "==> Running WAMP message SerDes conformance tests..."
190+
echo "==> Python environment: ${{ matrix.python-env }}"
191+
echo "==> Test vectors from: wamp-proto/testsuite/"
192+
193+
# Create output directory for test results
194+
mkdir -p test-results/serdes-${{ matrix.python-env }}
195+
196+
# Run tests and generate reports
197+
VENV_PYTHON=$(just --quiet _get-venv-python ${{ matrix.python-env }})
198+
${VENV_PYTHON} -m pytest -v \
199+
--junitxml=test-results/serdes-${{ matrix.python-env }}/junit.xml \
200+
examples/serdes/tests/test_publish.py \
201+
examples/serdes/tests/test_event.py
202+
203+
# Create summary
204+
echo "SerDes Conformance Test Results - ${{ matrix.python-env }}" > test-results/serdes-${{ matrix.python-env }}/summary.txt
205+
echo "======================================================" >> test-results/serdes-${{ matrix.python-env }}/summary.txt
206+
echo "Test run completed at: $(date)" >> test-results/serdes-${{ matrix.python-env }}/summary.txt
207+
echo "Python environment: ${{ matrix.python-env }}" >> test-results/serdes-${{ matrix.python-env }}/summary.txt
208+
209+
- name: Upload SerDes test results
210+
if: always()
211+
uses: wamp-proto/wamp-cicd/.github/actions/upload-artifact-verified@main
212+
with:
213+
name: serdes-test-results-${{ matrix.python-env }}
214+
path: test-results/serdes-${{ matrix.python-env }}/
215+
retention-days: 7
216+
129217
documentation:
130218
name: Documentation Build
131219
needs: identifiers
@@ -422,8 +510,8 @@ jobs:
422510
build-package:
423511
name: Package Build
424512
runs-on: ubuntu-24.04
425-
needs: [identifiers, quality-checks, build-schema]
426-
# needs: [identifiers, quality-checks, tests, build-schema]
513+
needs: [identifiers, quality-checks, build-schema, test-serdes]
514+
# needs: [identifiers, quality-checks, tests, build-schema, test-serdes]
427515

428516
env:
429517
BASE_REPO: ${{ needs.identifiers.outputs.base_repo }}

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,18 @@ jobs:
475475
github-token: ${{ secrets.GITHUB_TOKEN }}
476476
continue-on-error: true
477477

478+
- name: Download SerDes conformance test results
479+
uses: wamp-proto/wamp-cicd/actions/download-artifact-verified@main
480+
with:
481+
pattern: serdes-test-results-*
482+
merge-multiple: true
483+
path: serdes-test-results/
484+
run-id: ${{ needs.check-all-workflows.outputs.main_run_id }}
485+
github-token: ${{ secrets.GITHUB_TOKEN }}
486+
max-attempts: 3
487+
retry-delay: 10
488+
continue-on-error: true
489+
478490
- name: Download WebSocket conformance HTML reports with-nvx (for RTD)
479491
uses: actions/download-artifact@v4
480492
with:
@@ -1230,6 +1242,18 @@ jobs:
12301242
github-token: ${{ secrets.GITHUB_TOKEN }}
12311243
continue-on-error: true
12321244

1245+
- name: Download SerDes conformance test results
1246+
uses: wamp-proto/wamp-cicd/actions/download-artifact-verified@main
1247+
with:
1248+
pattern: serdes-test-results-*
1249+
merge-multiple: true
1250+
path: serdes-test-results/
1251+
run-id: ${{ needs.check-all-workflows.outputs.main_run_id }}
1252+
github-token: ${{ secrets.GITHUB_TOKEN }}
1253+
max-attempts: 3
1254+
retry-delay: 10
1255+
continue-on-error: true
1256+
12331257
- name: Download WebSocket conformance HTML reports with-nvx (for RTD)
12341258
uses: actions/download-artifact@v4
12351259
with:

0 commit comments

Comments
 (0)