Skip to content

Commit

Permalink
Merge pull request #6894 from drew2a/feature/looptime
Browse files Browse the repository at this point in the history
Add looptime
  • Loading branch information
drew2a authored May 9, 2022
2 parents d0f295f + 07858fa commit 3961a22
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
- name: Run Pytest with Coverage
run: |
coverage run --source=./src/tribler/core -p -m pytest ./src/tribler/core
coverage run --source=./src/tribler/core -p -m pytest ./src/tribler/core/components/tunnel/tests/test_full_session --tunneltests
coverage run --source=./src/tribler/core -p -m pytest ./src/tribler/core --looptime
coverage run --source=./src/tribler/core -p -m pytest ./src/tribler/core/components/tunnel/tests/test_full_session --tunneltests --looptime
coverage combine
coverage xml
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ jobs:
matrix:
python-version: [ '3.8' ]
os: [ macos-latest, windows-latest, ubuntu-latest ]
include:
- os: macos-latest
pytest-arguments: --timeout=300 --looptime
- os: windows-latest
pytest-arguments: --timeout=300
- os: ubuntu-latest
pytest-arguments: --timeout=60 --looptime

steps:
- uses: actions/checkout@v3
Expand All @@ -22,7 +29,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install Libsodium
- name: Install Libsodium (win)
if: matrix.os == 'windows-latest'
run: |
C:\msys64\usr\bin\wget.exe -q https://download.libsodium.org/libsodium/releases/libsodium-1.0.17-msvc.zip
Expand All @@ -34,21 +41,10 @@ jobs:
python -m pip install --upgrade pip
pip install -r ./requirements-test.txt
#https://pypi.org/project/pytest-timeout/
- name: Override PYTEST_TIMEOUT (mac)
if: matrix.os == 'macos-latest'
run: |
echo "PYTEST_TIMEOUT=300" >> $GITHUB_ENV
- name: Override PYTEST_TIMEOUT (win)
if: matrix.os == 'windows-latest'
run: |
echo "PYTEST_TIMEOUT=300" >> $env:GITHUB_ENV
- name: Run Pytest
run: |
pytest ./src/tribler/core
pytest ./src/tribler/core ${{matrix.pytest-arguments}}
- name: Run Tunnels Tests
run: |
pytest ./src/tribler/core/components/tunnel/tests/test_full_session --tunneltests
pytest ./src/tribler/core/components/tunnel/tests/test_full_session --tunneltests ${{matrix.pytest-arguments}}
3 changes: 2 additions & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r requirements.txt

pytest==7.1.1
pytest==7.1.2
pytest-aiohttp==1.0.4
pytest-asyncio==0.18.3
pytest-mock==3.7.0
Expand All @@ -9,5 +9,6 @@ pytest-timeout==2.1.0
pytest-freezegun==0.4.2
freezegun==1.2.1
coverage==6.3.2
looptime==0.2

asynctest==0.13.0 # this library has to be installed to properly work with ipv8 TestBase.

0 comments on commit 3961a22

Please sign in to comment.