Skip to content

Commit

Permalink
Add documentation and pytest workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
drew2a committed Apr 6, 2022
1 parent ab79ceb commit 1cb590d
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/documentation.yml
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
75 changes: 75 additions & 0 deletions .github/workflows/pytest.yml
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

0 comments on commit 1cb590d

Please sign in to comment.