-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Run pytest with custom ipv8 version | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
python-version: | ||
description: Python version | ||
default: '3.8' | ||
type: string | ||
required: true | ||
|
||
ipv8-git-ref: | ||
description: IPv8 Git Ref | ||
default: 'master' | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
run: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
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 | ||
|
||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{inputs.python-version}} | ||
|
||
- name: Install pip dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-test.txt | ||
- name: Upgrade pyipv8 to the specified version | ||
run: | | ||
python -m pip install --upgrade pyipv8@git+https://github.com/Tribler/py-ipv8.git@${{inputs.ipv8-git-ref}} | ||
python -m pip show pyipv8 | ||
- name: Install windows dependencies | ||
if: runner.os == 'Windows' | ||
uses: ./.github/actions/windows_dependencies | ||
|
||
- name: Run Pytest | ||
run: | | ||
pytest ./src/tribler/core ${{matrix.pytest-arguments}} | ||
- name: Run Tunnels Tests | ||
run: | | ||
pytest ./src/tribler/core/components/tunnel/tests/test_full_session --tunneltests ${{matrix.pytest-arguments}} |