Skip to content
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

Codspeed #3

Closed
wants to merge 7 commits into from
Closed
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
8 changes: 7 additions & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,20 @@ jobs:
if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
- name: Type check with pyright
run: pyright
- name: Run benchmarks
if: ${{ matrix.python == '3.12' }}
uses: CodSpeedHQ/action@v3
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: pytest tests/ --codspeed
- name: Test with tox
run: tox -e py
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
finish:
coveralls:
needs: build
if: ${{ always() }}
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pytest-asyncio
pytest-cov
pytest-xdist
pytest-rerunfailures
pytest-codspeed
requests-mock
tox
setuptools
Expand Down
6 changes: 6 additions & 0 deletions tests/test_ws_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ async def test_ws_api_public_endpoint(clientAsync):
"""Test normal order book request"""
order_book = await clientAsync.ws_get_order_book(symbol="BTCUSDT")
assert_ob(order_book)


@pytest.mark.asyncio
async def test_benchmark_ws_api_order_book(clientAsync, benchmark):
"""Test normal order book request"""
await benchmark(clientAsync.ws_get_order_book, symbol="BTCUSDT")


@pytest.mark.asyncio
Expand Down
Loading