11# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33
4- name : Test with PyTest
4+ name : language_tool_python CI
55
66on :
77 push :
1010 branches : [ master ]
1111
1212jobs :
13- build :
14-
15- runs-on : ubuntu-22.04
13+ tests :
14+ name : Test on Python ${{ matrix.python-version }}
15+ runs-on : ubuntu-latest
1616 strategy :
17+ fail-fast : false
1718 matrix :
18- python-version : ["3.9", "3.10", "3.11"]
19+ python-version : ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ]
1920
2021 steps :
21- - uses : actions/checkout@v2
22+ - name : Clone repository
23+ uses : actions/checkout@v5
2224
2325 - name : Set up Python ${{ matrix.python-version }}
24- uses : actions/setup-python@v4
26+ uses : actions/setup-python@v6
2527 with :
2628 python-version : ${{ matrix.python-version }}
29+
30+ - name : Install uv
31+ uses : astral-sh/setup-uv@v7
2732
28- - name : Set up JDK 21
29- uses : actions/setup-java@v3
33+ - name : Set up JDK 25
34+ uses : actions/setup-java@v5
3035 with :
3136 distribution : ' temurin'
32- java-version : ' 21'
33-
34- - name : Create and activate virtualenv
35- run : |
36- python -m venv venv
37- source venv/bin/activate
38- python -m pip install --upgrade pip
37+ java-version : ' 25'
3938
40- - name : Install dependencies
39+ - name : Install dependencies & build package
4140 run : |
42- source venv/bin/activate
43- pip install setuptools wheel build pytest pytest-xdist
44- python -m build --sdist --wheel
45- pip install dist/*.whl
41+ uv pip install setuptools wheel build pytest pytest-xdist --system
42+ uv build
43+ uv pip install dist/*.whl --system
4644
4745 - name : Verify installed packages
4846 run : |
49- source venv/bin/activate
50- pip list
47+ uv pip list
5148
5249 - name : Import language_tool_python
5350 run : |
54- source venv/bin/activate
5551 printf "import language_tool_python\n" | python
5652
5753 - name : Test with pytest
5854 run : |
59- source venv/bin/activate
6055 pytest -vx --dist=loadfile -n auto
6156
6257 - name : Run additional tests in bash scripts for Ubuntu
6358 run : |
64- source venv/bin/activate
6559 bash tests/test_local.bash
6660 bash tests/test_remote.bash
61+
62+ lint :
63+ name : Lint with Ruff
64+ runs-on : ubuntu-latest
65+ steps :
66+ - name : Clone repository
67+ uses : actions/checkout@v5
68+
69+ - name : Install uv
70+ uses : astral-sh/setup-uv@v7
71+
72+ - name : Run Ruff Linter
73+ run : |
74+ uvx ruff check .
75+ uvx ruff format --check .
0 commit comments