-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Advertise support for Python 3.11 (#126)
- Remove coverage submission for Python 2.7
- Loading branch information
Showing
16 changed files
with
333 additions
and
312 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -12,9 +12,9 @@ on: | |
workflow_dispatch: | ||
|
||
env: | ||
LATEST_PYTHON_VER: "3.10" | ||
LATEST_PYTHON_VER: "3.11" | ||
LATEST_QBT_VER: "v4.4.5" | ||
SUBMIT_COVERAGE_VERSIONS: "2.7, 3.10" | ||
SUBMIT_COVERAGE_VERSIONS: '[ "3.11" ]' | ||
QBITTORRENTAPI_HOST: "localhost:8080" | ||
QBITTORRENTAPI_PASSWORD: "adminadmin" | ||
QBITTORRENTAPI_USERNAME: "admin" | ||
|
@@ -32,26 +32,24 @@ jobs: | |
steps: | ||
- name: Declare Latest qBittorrent Version | ||
id: set-qbittorrent-latest-version | ||
run: echo "::set-output name=qbittorrent-latest-version::${{ env.LATEST_QBT_VER }}" | ||
run: echo "qbittorrent-latest-version=${{ env.LATEST_QBT_VER }}" >> ${GITHUB_OUTPUT} | ||
|
||
- name: Declare Latest Python Version | ||
id: set-python-latest-version | ||
run: echo "::set-output name=python-latest-version::${{ env.LATEST_PYTHON_VER }}" | ||
|
||
- name: Branch | ||
run: echo Branch ${{ github.ref }} ${{ github.head_ref }} | ||
run: echo "python-latest-version=${{ env.LATEST_PYTHON_VER }}" >> ${GITHUB_OUTPUT} | ||
|
||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v3.1.0 | ||
|
||
- name: Set up Python ${{ env.LATEST_PYTHON_VER }} | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v4.3.0 | ||
with: | ||
python-version: ${{ env.LATEST_PYTHON_VER }} | ||
cache: 'pip' | ||
check-latest: true | ||
cache-dependency-path: ${{ github.workspace }}/setup.cfg | ||
|
||
- name: Lint with Pre-commit | ||
- name: Lint | ||
uses: pre-commit/[email protected] | ||
|
||
Tests: | ||
|
@@ -60,13 +58,18 @@ jobs: | |
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
timeout-minutes: 10 | ||
env: | ||
IS_QBT_DEV: ${{ matrix.IS_QBT_DEV }} | ||
QBT_VER: ${{ matrix.QBT_VER }} | ||
strategy: | ||
matrix: | ||
PYTHON_VER: [ "${{ needs.verify.outputs.python-latest-version }}" ] | ||
QBT_VER: [ v4.4.4, v4.3.9, v4.3.5, v4.3.4.1, v4.3.3, v4.3.2, v4.3.1, v4.3.0.1, v4.2.5, v4.2.0, v4.1.6, v4.1.0 ] | ||
include: | ||
# test all python versions against latest qBittorrent | ||
- PYTHON_VER: "3.11-dev" | ||
# - PYTHON_VER: "3.12-dev" | ||
# QBT_VER: ${{ needs.verify.outputs.qbittorrent-latest-version }} | ||
- PYTHON_VER: "3.11" | ||
QBT_VER: ${{ needs.verify.outputs.qbittorrent-latest-version }} | ||
- PYTHON_VER: "3.10" | ||
QBT_VER: ${{ needs.verify.outputs.qbittorrent-latest-version }} | ||
|
@@ -100,38 +103,40 @@ jobs: | |
PYTHON_VER: ${{ needs.verify.outputs.python-latest-version }} | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v3.1.0 | ||
|
||
- name: Set up Python ${{ matrix.PYTHON_VER }} | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v4.3.0 | ||
with: | ||
python-version: ${{ matrix.PYTHON_VER }} | ||
cache: 'pip' | ||
check-latest: true | ||
cache-dependency-path: ${{ github.workspace }}/setup.cfg | ||
|
||
- name: Start qBittorrent ${{ matrix.QBT_VER }} | ||
run: docker run ${{ env.DOCKER_ARGS }} ${{ env.DOCKER_IMAGE_NAME }}:${{ matrix.QBT_VER }}-debug | ||
|
||
- name: Test with pytest | ||
run: | | ||
pip install .[test] | ||
IS_QBT_DEV=${{ matrix.IS_QBT_DEV }} | ||
QBT_VER=${{ matrix.QBT_VER }} | ||
pytest | ||
- name: Install | ||
run: pip install .[test] | ||
|
||
- name: Test | ||
run: pytest | ||
|
||
- name: qBittorrent Log | ||
run: docker logs qbt | ||
|
||
- name: Upload Coverage to Codecov | ||
if: ((contains(env.SUBMIT_COVERAGE_VERSIONS, matrix.PYTHON_VER)) && ((github.event_name == 'pull_request') || (github.event_name == 'push'))) | ||
uses: codecov/codecov-action@v3 | ||
if: | | ||
contains(fromJson(env.SUBMIT_COVERAGE_VERSIONS), matrix.PYTHON_VER) | ||
&& contains(fromJson('["push", "pull_request"]'), github.event_name) | ||
uses: codecov/[email protected] | ||
with: | ||
fail_ci_if_error: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Send mail | ||
if: failure() | ||
uses: dawidd6/action-send-mail@v3 | ||
uses: dawidd6/action-send-mail@v3.7.1 | ||
with: | ||
server_address: smtp.gmail.com | ||
server_port: 587 | ||
|
@@ -153,13 +158,14 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v3.1.0 | ||
|
||
- name: Set up Python ${{ env.LATEST_PYTHON_VER }} | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v4.3.0 | ||
with: | ||
python-version: ${{ env.LATEST_PYTHON_VER }} | ||
cache: 'pip' | ||
cache-dependency-path: ${{ github.workspace }}/setup.cfg | ||
|
||
- name: Install Build Tools | ||
run: python -m pip install -U pip setuptools wheel twine build | ||
|
@@ -185,13 +191,14 @@ jobs: | |
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v3.1.0 | ||
|
||
- name: Set up Python ${{ env.LATEST_PYTHON_VER }} | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v4.3.0 | ||
with: | ||
python-version: ${{ env.LATEST_PYTHON_VER }} | ||
cache: 'pip' | ||
cache-dependency-path: ${{ github.workspace }}/setup.cfg | ||
|
||
- name: Install in Dev Mode | ||
run: | | ||
|
@@ -210,16 +217,17 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v3.1.0 | ||
|
||
- name: Set up Python ${{ env.LATEST_PYTHON_VER }} | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v4.3.0 | ||
with: | ||
python-version: ${{ env.LATEST_PYTHON_VER }} | ||
cache: 'pip' | ||
cache-dependency-path: ${{ github.workspace }}/setup.cfg | ||
|
||
- name: Install Doc Build Requirements | ||
run: python -m pip install -r requirements-dev.txt | ||
- name: Install requirements | ||
run: python -m pip install .[dev] | ||
|
||
- name: Build Docs | ||
run: | | ||
|
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,29 @@ | ||
# .readthedocs.yaml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the version of Python and other tools you might need | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.11" | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
builder: html | ||
configuration: docs/source/conf.py | ||
|
||
# If using Sphinx, optionally build your docs in additional formats such as PDF | ||
# formats: | ||
|
||
# Optionally declare the Python requirements required to build your docs | ||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- dev |
Oops, something went wrong.