From 075370336a17f1bcf059b5aea93939d657393143 Mon Sep 17 00:00:00 2001 From: Anunnaki Astronaut <217353756+Anunnaki-Astronaut@users.noreply.github.com> Date: Fri, 21 Aug 2026 16:59:01 -0400 Subject: [PATCH] ci: restore upstream workflows removed by v1.1.1 sync --- .github/workflows/manifest.yml | 30 ++++++++++++++++++++++++++ .github/workflows/prospector.yml | 37 ++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 19 ++++++++++++++++ .github/workflows/tests.yml | 34 +++++++++++++++++++++++++++++ 4 files changed, 120 insertions(+) create mode 100644 .github/workflows/manifest.yml create mode 100644 .github/workflows/prospector.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/manifest.yml b/.github/workflows/manifest.yml new file mode 100644 index 0000000..eb167d9 --- /dev/null +++ b/.github/workflows/manifest.yml @@ -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" diff --git a/.github/workflows/prospector.yml b/.github/workflows/prospector.yml new file mode 100644 index 0000000..1d59527 --- /dev/null +++ b/.github/workflows/prospector.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a25e802 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..1a20ab0 --- /dev/null +++ b/.github/workflows/tests.yml @@ -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