1+ name : Tests
2+
3+ on :
4+ push :
5+ branches : [ main, master ]
6+ pull_request :
7+ branches : [ main, master ]
8+
9+ jobs :
10+ test :
11+ runs-on : ${{ matrix.os }}
12+ strategy :
13+ matrix :
14+ os : [ubuntu-latest, macos-latest, windows-latest]
15+ python-version : [3.8, 3.9, "3.10", 3.11, 3.12]
16+
17+ steps :
18+ - uses : actions/checkout@v3
19+
20+ - name : Set up Python ${{ matrix.python-version }}
21+ uses : actions/setup-python@v4
22+ with :
23+ python-version : ${{ matrix.python-version }}
24+
25+ - name : Install dependencies
26+ run : |
27+ python -m pip install --upgrade pip
28+ pip install -e .
29+ pip install -r requirements-test.txt
30+
31+ - name : Run unit tests
32+ run : |
33+ pytest tests/test_plugin.py tests/test_utils.py tests/test_cli.py tests/test_integration.py tests/test_dash_simple.py
34+
35+ test-browser :
36+ runs-on : ${{ matrix.os }}
37+ strategy :
38+ matrix :
39+ os : [ubuntu-latest, macos-latest, windows-latest]
40+ python-version : [3.9, "3.10", 3.11]
41+
42+ steps :
43+ - uses : actions/checkout@v3
44+
45+ - name : Set up Python ${{ matrix.python-version }}
46+ uses : actions/setup-python@v4
47+ with :
48+ python-version : ${{ matrix.python-version }}
49+
50+ - name : Install dependencies
51+ run : |
52+ python -m pip install --upgrade pip
53+ pip install -e .
54+ pip install -r requirements-test.txt
55+
56+ - name : Install browser for testing (Ubuntu)
57+ if : matrix.os == 'ubuntu-latest'
58+ run : |
59+ sudo apt-get update
60+ sudo apt-get install -y chromium-browser chromium-chromedriver
61+
62+ - name : Install browser for testing (macOS)
63+ if : matrix.os == 'macos-latest'
64+ run : |
65+ brew install --cask chromium chromedriver
66+
67+ - name : Install browser for testing (Windows)
68+ if : matrix.os == 'windows-latest'
69+ run : |
70+ choco install chromium chromedriver
71+
72+ - name : Run browser tests
73+ run : |
74+ pytest tests/test_dash_callbacks.py tests/test_dash_integration.py
75+ env :
76+ DISPLAY : :99
77+ continue-on-error : true
78+
79+ lint :
80+ runs-on : ubuntu-latest
81+ steps :
82+ - uses : actions/checkout@v3
83+
84+ - name : Set up Python
85+ uses : actions/setup-python@v4
86+ with :
87+ python-version : " 3.10"
88+
89+ - name : Install dependencies
90+ run : |
91+ python -m pip install --upgrade pip
92+ pip install -e .
93+ pip install ruff
94+
95+ - name : Run linting
96+ run : |
97+ ruff check .
98+
99+ - name : Run format check
100+ run : |
101+ ruff format . --check
0 commit comments