mirror of
https://github.com/sabnzbd/sabnzbd.git
synced 2026-01-01 12:08:55 -05:00
64 lines
1.7 KiB
YAML
64 lines
1.7 KiB
YAML
name: CI Tests
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
black:
|
|
name: Black Code Formatter
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Black Code Formatter
|
|
uses: lgeiger/black-action@master
|
|
with:
|
|
args: >
|
|
SABnzbd.py
|
|
sabnzbd
|
|
scripts
|
|
tools
|
|
builder
|
|
builder/SABnzbd.spec
|
|
tests
|
|
--line-length=120
|
|
--target-version=py39
|
|
--check
|
|
--diff
|
|
|
|
test:
|
|
name: Test ${{ matrix.name }} - Python ${{ matrix.python-version }}
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 20
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ]
|
|
name: ["Linux"]
|
|
os: [ubuntu-latest]
|
|
include:
|
|
- name: macOS
|
|
os: macos-latest
|
|
python-version: "3.14"
|
|
- name: Windows
|
|
os: windows-2022
|
|
python-version: "3.14"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: pip
|
|
cache-dependency-path: "**/requirements.txt"
|
|
- name: Install system dependencies
|
|
if: runner.os == 'Linux'
|
|
run: sudo apt-get install unrar 7zip par2
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python --version
|
|
python -m pip install --upgrade pip wheel
|
|
pip install --upgrade -r requirements.txt --no-dependencies
|
|
pip install --upgrade -r tests/requirements.txt
|
|
- name: Test SABnzbd
|
|
run: pytest -s
|