Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Manifest Check

permissions:
contents: read

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

jobs:
manifest-check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Check manifest.json exists
run: |
if [ ! -f manifest.json ]; then
echo "manifest.json not found!"
exit 1
fi
echo "manifest.json found"

- name: Validate JSON syntax
run: |
python -c "import json; json.load(open('manifest.json'))"
echo "manifest.json is valid JSON"
37 changes: 37 additions & 0 deletions .github/workflows/prospector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Prospector Python Static Analysis

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

permissions:
contents: read

jobs:
prospector:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.8'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install prospector[with_pyroma]

- name: Run Prospector
run: prospector --zero-exit main.py

- name: Upload Prospector report
uses: actions/upload-artifact@v5
if: always()
with:
name: prospector-report
path: prospector-report.json
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: extension release

on:
push:
tags:
- "v*"

jobs:
manifest:
uses: nzbgetcom/nzbget-extensions/.github/workflows/manifest.yml@main

release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [manifest]
uses: nzbgetcom/nzbget-extensions/.github/workflows/extension-release.yml@main
with:
release-file-list: main.py manifest.json
release-file-name: removesamples
release-dir: RemoveSamples
34 changes: 34 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Tests

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Run tests
run: |
python -m unittest tests.py -v
Loading