-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (68 loc) · 2.31 KB
/
test.yml
File metadata and controls
79 lines (68 loc) · 2.31 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
name: Test
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.13'
- name: Install uv (Windows)
if: matrix.os == 'windows-latest'
run: |
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
echo "$env:USERPROFILE\.cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install uv (Unix)
if: matrix.os != 'windows-latest'
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install system dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y \
libegl1-mesa-dev \
libgl1-mesa-dev \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-render-util0 \
libxcb-xkb1 \
libxkbcommon-x11-0 \
xvfb
- name: Install dependencies
run: |
uv pip install --system pyside6
- name: Test core functionality
run: |
python test_imports.py
- name: Test GUI imports (Linux with virtual display)
if: matrix.os == 'ubuntu-latest'
run: |
xvfb-run -a python -c "
from src.ui.main_window import GlimpseViewer
from src.version import get_version
print(f'GUI imports successful on Linux with virtual display')
print(f'Glimpse v{get_version()} - Full GUI test passed')
"
- name: Test GUI imports (Windows/macOS)
if: matrix.os != 'ubuntu-latest'
run: |
python -c "
from src.ui.main_window import GlimpseViewer
from src.version import get_version
print(f'GUI imports successful on ${{ matrix.os }}')
print(f'Glimpse v{get_version()} - Full GUI test passed')
"