Browse Source

Switch to GitHub Actions for CI

Removed the par2 files for the unicode job, they caused too much problems. It's a bad "fix" for #1509.
pull/1693/head
Safihre 4 years ago
parent
commit
9f2a9c32c0
  1. 37
      .github/workflows/integration_testing.yml
  2. 47
      .travis.yml
  3. 17
      appveyor.yml
  4. 1
      tests/conftest.py
  5. BIN
      tests/data/unicode_rar/我喜欢编程.vol00+01.par2
  6. BIN
      tests/data/unicode_rar/我喜欢编程.vol01+02.par2
  7. BIN
      tests/data/unicode_rar/我喜欢编程.vol03+04.par2
  8. BIN
      tests/data/unicode_rar/我喜欢编程.vol07+01.par2
  9. 2
      tests/test_functional_api.py
  10. 2
      tests/test_functional_misc.py

37
.github/workflows/integration_testing.yml

@ -0,0 +1,37 @@
name: CI Tests
on: [push, pull_request]
jobs:
test:
name: Test ${{ matrix.os }} - Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
os: [ubuntu-20.04]
include:
- os: macos-latest
python-version: 3.9
- os: windows-latest
python-version: 3.9
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
if: runner.os == 'Linux'
run: sudo apt-get install unrar p7zip-full par2 chromium-chromedriver
- name: Install Python dependencies
run: |
python --version
pip install --upgrade pip
pip install --upgrade -r requirements.txt
pip install --upgrade -r tests/requirements.txt
- name: Test SABnzbd
run: pytest -s

47
.travis.yml

@ -1,47 +0,0 @@
matrix:
include:
# On Linux we test all supported Python versions
# On macOS we only test the semi-recent version that is included
- os: linux
dist: focal
language: python
python: "3.6"
- os: linux
dist: focal
language: python
python: "3.7"
- os: linux
dist: focal
language: python
python: "3.8"
- os: linux
dist: focal
language: python
python: "3.9"
- os: osx
addons:
chrome: stable
env:
- HOMEBREW_NO_AUTO_UPDATE=1
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
LATEST_CHROMEDRIVER=$(curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE) &&
wget --no-verbose -O /tmp/chromedriver.zip https://chromedriver.storage.googleapis.com/$LATEST_CHROMEDRIVER/chromedriver_mac64.zip &&
sudo unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/;
else
sudo apt-get install unrar p7zip-full par2 chromium-chromedriver -y;
ln -s /usr/lib/chromium-browser/chromedriver ~/bin/chromedriver;
fi;
- python3 --version
- python3 -m pip install --upgrade pip wheel
- python3 -m pip install --upgrade -r requirements.txt
- python3 -m pip install --upgrade -r tests/requirements.txt
script:
- python3 -m pytest -s
notifications:
email:
on_success: never
on_failure: change

17
appveyor.yml

@ -1,17 +0,0 @@
image:
- Visual Studio 2019
environment:
# We only test the latest Python version
matrix:
- PYTHON: "C:\\Python38-x64"
install:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- python --version
- python -m pip install --upgrade pip wheel
- python -m pip install --upgrade -r requirements.txt
- python -m pip install --upgrade -r tests/requirements.txt
build_script:
- python -m pytest -s

1
tests/conftest.py

@ -113,7 +113,6 @@ def run_sabnzbd_sabnews_and_selenium(clean_cache_dir):
"0",
"--logging",
"2",
"--weblogging",
"--config",
SAB_CACHE_DIR,
]

BIN
tests/data/unicode_rar/我喜欢编程.vol00+01.par2

Binary file not shown.

BIN
tests/data/unicode_rar/我喜欢编程.vol01+02.par2

Binary file not shown.

BIN
tests/data/unicode_rar/我喜欢编程.vol03+04.par2

Binary file not shown.

BIN
tests/data/unicode_rar/我喜欢编程.vol07+01.par2

Binary file not shown.

2
tests/test_functional_api.py

@ -483,9 +483,9 @@ class TestQueueApi(ApiTestFunctions):
(False, False, "script_Sample-PostProc.py"),
(False, False, "invalid_option"),
(False, True, "script_foobar.py"), # Doesn't exist, see issue #1650
(True, True, "my_script_for_sab.py"), # Test for #1651
(False, True, "script_" + os.path.join("..", "SABnzbd.py")), # Outside the scriptsdir, #1650 again
(False, True, "script_"), # Empty after removal of the prefix
(True, True, "my_script_for_sab.py"), # Test for #1651
],
)
def test_api_queue_change_complete_action(self, should_work, set_scriptsdir, value):

2
tests/test_functional_misc.py

@ -65,7 +65,7 @@ class TestQueueRepair(SABnzbdBaseTest):
time.sleep(2)
# Let's check the queue
for _ in range(10):
for _ in range(30):
queue_result_slots = {}
try:
# Can give timeout if still restarting

Loading…
Cancel
Save