@@ -12,69 +12,46 @@ jobs:
1212 strategy :
1313 matrix :
1414 os : [ubuntu-latest, macos-latest, windows-latest]
15+ python-version : [3.8, 3.9, "3.10", 3.11, 3.12]
1516
1617 steps :
1718 - uses : actions/checkout@v3
1819
19- - name : Set up Python versions
20+ - name : Set up Python ${{ matrix.python-version }}
2021 uses : actions/setup-python@v4
2122 with :
22- python-version : |
23- 3.8
24- 3.9
25- 3.10
26- 3.11
27- 3.12
28-
29- - name : Install dependencies and run unit tests for each Python version
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
3032 run : |
31- # Define Python executables for different platforms
32- if [[ "$RUNNER_OS" == "Windows" ]]; then
33- PY38="py -3.8"
34- PY39="py -3.9"
35- PY310="py -3.10"
36- PY311="py -3.11"
37- PY312="py -3.12"
38- else
39- PY38="python3.8"
40- PY39="python3.9"
41- PY310="python3.10"
42- PY311="python3.11"
43- PY312="python3.12"
44- fi
45-
46- # Run tests for each Python version
47- for version in "3.8|$PY38" "3.9|$PY39" "3.10|$PY310" "3.11|$PY311" "3.12|$PY312"; do
48- IFS='|' read -r version_name python_exe <<< "$version"
49- echo "Setting up Python $version_name"
50- echo "Installing dependencies for Python $version_name"
51- $python_exe -m pip install --upgrade pip
52- $python_exe -m pip install -e .
53- $python_exe -m pip install -r requirements-test.txt
54-
55- echo "Running unit tests for Python $version_name"
56- $python_exe -m pytest tests/test_plugin.py tests/test_utils.py tests/test_cli.py tests/test_integration.py tests/test_dash_simple.py
57- done
58- shell : bash
33+ pytest tests/test_plugin.py tests/test_utils.py tests/test_cli.py tests/test_integration.py tests/test_dash_simple.py
5934
6035 test-browser :
6136 runs-on : ${{ matrix.os }}
6237 strategy :
6338 matrix :
6439 os : [ubuntu-latest, macos-latest, windows-latest]
40+ python-version : [3.8, 3.9, "3.10", 3.11, 3.12]
6541
6642 steps :
6743 - uses : actions/checkout@v3
6844
69- - name : Set up Python versions
45+ - name : Set up Python ${{ matrix.python-version }}
7046 uses : actions/setup-python@v4
7147 with :
72- python-version : |
73- 3.8
74- 3.9
75- 3.10
76- 3.11
77- 3.12
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
7855
7956 - name : Install browser for testing (Ubuntu)
8057 if : matrix.os == 'ubuntu-latest'
@@ -98,39 +75,11 @@ jobs:
9875 export DISPLAY=:99
9976 Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
10077
101- - name : Install dependencies and run browser tests for each Python version
78+ - name : Run browser tests
10279 run : |
103- # Define Python executables for different platforms
104- if [[ "$RUNNER_OS" == "Windows" ]]; then
105- PY38="py -3.8"
106- PY39="py -3.9"
107- PY310="py -3.10"
108- PY311="py -3.11"
109- PY312="py -3.12"
110- else
111- PY38="python3.8"
112- PY39="python3.9"
113- PY310="python3.10"
114- PY311="python3.11"
115- PY312="python3.12"
116- fi
117-
118- # Run tests for each Python version
119- for version in "3.8|$PY38" "3.9|$PY39" "3.10|$PY310" "3.11|$PY311" "3.12|$PY312"; do
120- IFS='|' read -r version_name python_exe <<< "$version"
121- echo "Setting up Python $version_name"
122- echo "Installing dependencies for Python $version_name"
123- $python_exe -m pip install --upgrade pip
124- $python_exe -m pip install -e .
125- $python_exe -m pip install -r requirements-test.txt
126-
127- echo "Running browser tests for Python $version_name"
128- $python_exe -m pytest tests/test_dash_callbacks.py tests/test_dash_integration.py
129- done
80+ pytest tests/test_dash_callbacks.py tests/test_dash_integration.py
13081 env :
13182 DISPLAY : :99
132- continue-on-error : true
133- shell : bash
13483
13584 lint-format :
13685 runs-on : ubuntu-latest
0 commit comments