Skip to content

ws init with tests

ws init with tests #3

Workflow file for this run

name: WebSocket Tests
on:
push:
branches:
- main
paths:
- 'connectiva/protocols/websocket_protocol.py'
- 'tests/test_websocket_protocol.py'
- 'pyproject.toml'
pull_request:
branches:
- main
paths:
- 'connectiva/protocols/websocket_protocol.py'
- 'tests/test_websocket_protocol.py'
- 'pyproject.toml'
jobs:
test-websocket:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
python -m pip install --upgrade pip
python -m pip install poetry
- name: Add Poetry to Path
run: echo "export PATH=\"$HOME/.local/bin:\$PATH\"" >> $GITHUB_ENV
- name: Install dependencies
run: poetry install
- name: Run WebSocket Tests
run: |
echo "Running WebSocket tests on Python ${{ matrix.python-version }}..."
poetry run python -m unittest discover -s tests -p 'test_websocket_protocol.py'