Skip to content

Add Websocket Test Client #58 #5

Add Websocket Test Client #58

Add Websocket Test Client #58 #5

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
tests-linux:
name: Test Linux Python${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
run: pytest tests
tests-windows:
name: Test Windows Python${{ matrix.python-version }}
runs-on: windows-latest
needs: [tests-linux]
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
run: pytest tests
tests-macos:
name: Test MacOS Python${{ matrix.python-version }}
runs-on: macos-latest
needs: [tests-linux]
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
run: pytest tests
coverage:
name: Coverage
runs-on: ubuntu-latest
needs: [tests-linux, tests-macos, tests-windows]
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Coverage Tests
run: coverage run -m unittest tests/test_*.py
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
build-n-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
needs: [coverage]
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Build source and wheel distributions
run: |
python -m pip install --upgrade build twine
python -m build
twine check --strict dist/*
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}