mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-25 10:49:06 +00:00
8fb25f71f3
* Added required dependency setuptools to install_requires * Remove optional dependency ipaddress from install_requires * Created extras_require in setup.py. The optional dependencies should not be included in install_requires so that users can either install forked dependencies or remove problematic ones. Updated documentation to detail how to install these optional dependencies. * Fixed README badge Refs: * https://dev.deluge-torrent.org/ticket/3470 * https://dev.deluge-torrent.org/ticket/3282 * https://dev.deluge-torrent.org/ticket/3353
91 lines
2.7 KiB
YAML
91 lines
2.7 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test-linux:
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: "3.8"
|
|
|
|
- name: Cache pip
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.cache/pip
|
|
# Look to see if there is a cache hit for the corresponding requirements file
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('tox.ini', 'setup.py', 'requirements*.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
${{ runner.os }}-
|
|
|
|
- name: Add libtorrent deb repository
|
|
uses: myci-actions/add-deb-repo@8
|
|
with:
|
|
repo: deb http://ppa.launchpad.net/libtorrent.org/1.2-daily/ubuntu focal main
|
|
repo-name: libtorrent
|
|
keys: 58E5430D9667FAEFFCA0B93F32309D6B9E009EDB
|
|
key-server: keyserver.ubuntu.com
|
|
install: python3-libtorrent
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install --upgrade pip wheel
|
|
pip install -r requirements.txt -r requirements-tests.txt
|
|
pip install -e .
|
|
|
|
- name: Test with pytest
|
|
run: |
|
|
cp /usr/lib/python3/dist-packages/libtorrent*.so $GITHUB_WORKSPACE/deluge
|
|
python -c 'from deluge._libtorrent import lt; print(lt.__version__)';
|
|
pytest -m "not (todo or gtkui or security)" deluge
|
|
|
|
test-windows:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: "3.6"
|
|
|
|
- name: Cache pip
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: '%LOCALAPPDATA%\pip\Cache'
|
|
# Look to see if there is a cache hit for the corresponding requirements file
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('tox.ini', 'setup.py', 'requirements*.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
${{ runner.os }}-
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip wheel certifi
|
|
python -m pip install deluge-libtorrent
|
|
pip install -r requirements.txt -r requirements-tests.txt
|
|
pip install -e .
|
|
|
|
- name: Test with pytest
|
|
run: |
|
|
python -c 'import libtorrent as lt; print(lt.__version__)';
|
|
pytest -m "not (todo or gtkui or security)" deluge
|