-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (74 loc) · 2.85 KB
/
test.yml
File metadata and controls
88 lines (74 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# This workflow installs dependencies, starts DataLab, and runs tests with live mode
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Test with Live DataLab
on:
push:
branches: [ "main", "develop" ]
pull_request:
branches: [ "main", "develop" ]
workflow_call:
workflow_dispatch:
jobs:
test:
env:
DISPLAY: ':99.0'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
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 \
x11-utils
- name: Start Xvfb
run: |
/sbin/start-stop-daemon --start --quiet \
--pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background \
--exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ruff pytest pytest-cov httpx
python -m pip install PyQt5
- name: Install DataLab and dependencies
run: |
if [ "${{ github.ref_name }}" = "develop" ]; then
# Development: clone and install from source (develop branches)
cd ..
git clone --depth 1 https://github.com/PlotPyStack/PythonQwt.git
git clone --depth 1 --branch develop https://github.com/PlotPyStack/guidata.git
git clone --depth 1 --branch develop https://github.com/PlotPyStack/plotpy.git
git clone --depth 1 --branch develop https://github.com/DataLab-Platform/sigima.git
git clone --depth 1 --branch develop https://github.com/DataLab-Platform/DataLab.git
cd DataLab-Kernel
pip install -e ../guidata
pip install -e ../PythonQwt
pip install -e ../plotpy
pip install -e ../sigima
pip install -e ../DataLab
else
# Release: install from PyPI
pip install datalab-platform
fi
- name: Install DataLab-Kernel
run: |
# Install without deps (we already have them)
pip install -e . --no-deps
# Install remaining deps from pyproject.toml
pip install ipykernel jupyter-client numpy h5py matplotlib plotly
- name: Lint with Ruff
run: ruff check --output-format=github datalab_kernel
- name: Run standalone tests
run: pytest --standalone-only -v --tb=long
- name: Run all tests
run: pytest -v --tb=long