25
25
PYICU_WIN_VER : 2.14
26
26
INSTALL_TORCH : false
27
27
INSTALL_FULL_DEPS : false
28
+ PYTHON_VERSION_LATEST : " 3.13"
29
+ PYTHON_VERSION_LATEST_2 : " 3.12"
28
30
29
31
steps :
30
32
- name : Checkout
@@ -71,10 +73,10 @@ jobs:
71
73
SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL : True
72
74
run : pip install -r docker_requirements.txt
73
75
- name : Install PyThaiNLP + dependencies (minimum)
74
- if : matrix.python-version != '3.12' && matrix.python-version != '3.13'
76
+ if : matrix.python-version != env.PYTHON_VERSION_LATEST && matrix.python-version != env.PYTHON_VERSION_LATEST_2
75
77
run : pip install .
76
78
- name : Install PyThaiNLP + dependencies (compact)
77
- if : matrix.python-version == '3.12' || matrix.python-version == '3.13'
79
+ if : matrix.python-version == env.PYTHON_VERSION_LATEST || matrix.python-version == env.PYTHON_VERSION_LATEST_2
78
80
run : pip install ".[compact]"
79
81
# If you want to install a safe small set of optional dependencies, use:
80
82
# pip install ".[compact]"
@@ -83,23 +85,24 @@ jobs:
83
85
# of dependencies to avoid the conflict between dependencies.
84
86
# See: https://github.com/PyThaiNLP/pythainlp/issues/935
85
87
- name : Unit test (core)
86
- if : matrix.python-version != '3.12' && matrix.python-version != '3.13'
88
+ if : matrix.python-version != env.PYTHON_VERSION_LATEST && matrix.python-version != env.PYTHON_VERSION_LATEST_2
87
89
env :
88
90
PYTHONIOENCODING : utf-8
89
91
run : coverage run -m unittest tests.core
90
92
- name : Unit test (core + compact)
91
- if : matrix.python-version == '3.12' || matrix.python-version == '3.13'
93
+ if : matrix.python-version == env.PYTHON_VERSION_LATEST || matrix.python-version == env.PYTHON_VERSION_LATEST_2
92
94
env :
93
95
PYTHONIOENCODING : utf-8
94
96
run : coverage run -m unittest tests.core tests.compact
97
+ # Only test "compact" set with the latest two stable Python versions.
95
98
# Use 'unittest <test_module>' instead of 'unittest discover' to avoid
96
99
# loading tests with dependencies more than expected.
97
100
# Test cases loaded is defined in __init__.py in the tests directory.
98
101
# See also tests/README.md
99
102
- name : Coverage report
100
- if : matrix.python-version == '3.13'
103
+ if : matrix.python-version == env.PYTHON_VERSION_LATEST
101
104
env :
102
105
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
103
106
COVERALLS_SERVICE_NAME : github
104
107
run : coveralls
105
- # Submit only from the latest Python version
108
+ # Only submit a report from the latest Python version
0 commit comments