-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
documentation
and pytest
workflows
- Loading branch information
Showing
2 changed files
with
96 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,21 @@ | ||
name: Documentation (no publish) | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.9" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r ./doc/requirements.txt | ||
- name: Build documentation | ||
run: | | ||
python -m sphinx -T -E -b html -d _build/doctrees -D language=en ./doc _build/html | ||
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,75 @@ | ||
name: Pytest | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
posix: | ||
runs-on: ${{ matrix.config.os }} | ||
strategy: | ||
matrix: | ||
config: | ||
- { os: 'ubuntu-latest', python-version: '3.8' } | ||
- { os: 'ubuntu-latest', python-version: '3.9' } | ||
- { os: 'macos-latest', python-version: '3.8' } | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.config.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.config.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r ./requirements-test.txt | ||
- name: Run pytest | ||
run: | | ||
pytest ./src/tribler/core | ||
# pytest ./src/tribler/core -v --cov=tribler --cov-report=xml:../output/coverage.xml --junitxml=test_report.xml | ||
|
||
- name: Run tunnels tests | ||
run: | | ||
pytest ./src/tribler/core/components/tunnel/tests/test_full_session --tunneltests | ||
windows: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
python-version: [ "3.8" ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Download libsodium | ||
uses: suisei-cn/actions-download-file@v1 | ||
with: | ||
url: https://download.libsodium.org/libsodium/releases/libsodium-1.0.17-msvc.zip | ||
target: . | ||
|
||
- name: Extract libsodium | ||
run: 7z x libsodium-1.0.17-msvc.zip | ||
|
||
- name: Copy libsodium | ||
run: | | ||
copy ./x64/Release/v141/dynamic/libsodium.dll C:\Windows\system32\ | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r ./requirements-test.txt | ||
- name: Run pytest | ||
run: | | ||
pytest ./src/tribler/core | ||
- name: Run tunnels tests | ||
run: | | ||
pytest ./src/tribler/core/components/tunnel/tests/test_full_session --tunneltests |