Files
sabnzbd/.github/workflows/integration_testing.yml

74 lines
2.0 KiB
YAML

name: CI Tests
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
black-and-ruff:
name: Black and Ruff checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- run: pip install ruff black
- name: Black code formatter
run: >
black
SABnzbd.py
sabnzbd
scripts
builder
builder/SABnzbd.spec
tests
tools
--check
--diff
- name: Ruff checks
run: ruff check
test:
name: Test ${{ matrix.name }} - Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
# TODO: Remove libxml2-dev libxslt-dev below once 3.15 is stable and lxml releases wheels!
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14", "3.15-dev" ]
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@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
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 libxml2-dev libxslt-dev
- name: Install Python dependencies
run: |
python --version
python -m pip install --upgrade pip wheel
pip install -r requirements.txt --no-dependencies
pip install --upgrade -r tests/requirements.txt
- name: Install Playwright browser
run: python -m playwright install chromium --with-deps
- name: Test SABnzbd
run: pytest -n auto --dist loadscope