-
Notifications
You must be signed in to change notification settings - Fork 14
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
4 changed files
with
98 additions
and
71 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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [ master, develop, main ] | ||
pull_request: | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
python: ['3.9', '3.12'] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Setup Deluge | ||
run: | | ||
if [ "$RUNNER_OS" == "Windows" ]; then | ||
choco install deluge | ||
else | ||
sudo add-apt-repository ppa:deluge-team/develop -y | ||
sudo apt-get -qq update | ||
sudo apt-get install deluged -y | ||
fi | ||
shell: bash | ||
|
||
- name: Start Deluge | ||
run: | | ||
if [ "$RUNNER_OS" == "Windows" ]; then | ||
mkdir $APPDATA/deluge | ||
"c:/Program Files/Deluge/deluged.exe" & | ||
else | ||
/usr/bin/deluged --version | ||
/usr/bin/deluged & | ||
fi | ||
sleep 10 | ||
shell: bash | ||
|
||
- name: Install project | ||
run: | | ||
python -m pip install -U pytest | ||
python -m pip install . | ||
- name: Run tests | ||
run: python -m pytest . |
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,41 @@ | ||
name: Publish to pypi | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
tags: | ||
- 1.* | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-publish: | ||
name: Build and publish Python | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: deluge-client | ||
url: https://test.pypi.org/p/deluge-client | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
- name: Install pypa/build | ||
run: >- | ||
python -m | ||
pip install | ||
build | ||
- name: Build packages | ||
run: >- | ||
python -m | ||
build | ||
--sdist | ||
--wheel | ||
--outdir dist/ | ||
- name: Publish distribution | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ |
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