Skip to content

Commit

Permalink
update tests to orange-ci-cd
Browse files Browse the repository at this point in the history
  • Loading branch information
markotoplak committed Jan 10, 2024
1 parent df48022 commit b217549
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 107 deletions.
110 changes: 11 additions & 99 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,104 +7,16 @@ on:
pull_request:
branches:
- master
workflow_dispatch:
schedule:
- cron: '0 6 1 * *'

jobs:
build:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
timeout-minutes: 20
name: ${{ matrix.name }} (${{ matrix.os }}, ${{ matrix.python-version }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-11, windows-2019]
python-version: [3.8, 3.9]
tox_env: [py-orange-released]
experimental: [false]
name: [Released]
include:
- os: ubuntu-20.04
python-version: 3.9
tox_env: py-orange-dask
name: Dask
experimental: false

- os: windows-2019
python-version: 3.8
tox_env: py-orange-oldest
experimental: false
name: Oldest
- os: macos-11
python-version: 3.8
tox_env: py-orange-oldest
name: Oldest
experimental: false
- os: ubuntu-20.04
python-version: 3.8
tox_env: py-orange-oldest
name: Oldest
experimental: false

- os: windows-2019
python-version: 3.9
tox_env: py-orange-latest
experimental: false
name: Latest
- os: macos-11
python-version: 3.9
tox_env: py-orange-latest
experimental: false
name: Latest
- os: ubuntu-20.04
python-version: 3.9
tox_env: py-orange-latest
experimental: false
name: Latest

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 linux system dependencies
if: |
matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libegl1-mesa libxcb-shape0
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox
- name: Set environment variable
# this step sets QT_QPA_PLATFORM env which is required on Ubuntu and
# it is skipped on Windows - QLabel font issues
if: runner.os != 'Windows'
run: |
echo "QT_QPA_PLATFORM=offscreen" >> $GITHUB_ENV
- name: Test with Tox
run: |
tox -e ${{ matrix.tox_env }}
env:
# Raise deprecations as errors in our tests only when testing orange-oldest and orange-released.
ORANGE_DEPRECATIONS_ERROR: "${{ matrix.tox_env != 'py-orange-latest' && '1' || '' }}"
# Need this otherwise unittest installs a warning filter that overrides
# our desire to have OrangeDeprecationWarnings raised
PYTHONWARNINGS: module

- name: Upload code coverage
if: |
matrix.python-version == '3.9' &&
matrix.os == 'ubuntu-20.04' &&
matrix.tox_env == 'py-orange-dask'
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
normal:
name: Usual
uses: biolab/orange-ci-cd/.github/workflows/test-addons.yml@master
dask:
name: Dask
uses: biolab/orange-ci-cd/.github/workflows/test-job.yml@master
with:
os: ubuntu-latest
python-version: '3.10'
tox_env: dask
pyqt: '5.15.*'
14 changes: 6 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
[tox]
envlist =
py{38,39}-orange-{oldest, latest, released}
orange-{oldest, latest, released}
pylint-ci
skip_missing_interpreters = true
isolated_build = true
toxworkdir={env:TOX_WORK_DIR:.tox}

[testenv]
# must use latest pip (version 20.3.1 enables Big Sur support - https://github.com/pypa/pip/issues/9138)
pip_version = pip
download = true
extras = test
passenv = *
# we MUST changedir to avoid installed being shadowed by working dir
Expand All @@ -21,8 +19,8 @@ setenv =
COVERAGE_FILE = {toxinidir}/.coverage
COVERAGE_RCFILE = {toxinidir}/.coveragerc
deps =
pyqt5==5.12.*
pyqtwebengine==5.12.*
{env:PYQT_PYPI_NAME:PyQt5}=={env:PYQT_PYPI_VERSION:5.15.*}
{env:WEBENGINE_PYPI_NAME:PyQtWebEngine}=={env:WEBENGINE_PYPI_VERSION:5.15.*}
oldest: orange3==3.34.0
oldest: orange-canvas-core==0.1.28
oldest: orange-widget-base==4.19.0
Expand All @@ -37,10 +35,10 @@ deps =
latest: https://github.com/biolab/orange-canvas-core/archive/refs/heads/master.zip#egg=orange-canvas-core
latest: https://github.com/biolab/orange-widget-base/archive/refs/heads/master.zip#egg=orange-widget-base
opusFC
# temporary util the new Orange is released
pandas<2.1
dask: https://github.com/biolab/orange3/archive/refs/heads/dask.zip#egg=orange3
commands_pre =
# check pip version in virtualenv
pip --version
# Verify installed packages have compatible dependencies
pip check
# freeze environment
Expand Down

0 comments on commit b217549

Please sign in to comment.