Skip to content

Commit fcff578

Browse files
committed
ci: hash pinning of actions, fix other dependencies/settings
1 parent ee53243 commit fcff578

1 file changed

Lines changed: 24 additions & 26 deletions

File tree

.github/workflows/test.yml

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
name: language_tool_python CI
55

6+
permissions:
7+
contents: read
8+
69
on:
710
push:
811
branches: [ master ]
@@ -12,58 +15,58 @@ on:
1215

1316
jobs:
1417
tests:
18+
timeout-minutes: 20
1519
name: Test on Python ${{ matrix.python-version }}
16-
runs-on: ubuntu-latest
20+
runs-on: ubuntu-24.04
1721
strategy:
1822
fail-fast: false
1923
matrix:
2024
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
2125

2226
steps:
2327
- name: Clone repository
24-
uses: actions/checkout@v6.0.2
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
2529

2630
- name: Set up Python ${{ matrix.python-version }}
27-
uses: actions/setup-python@v6.2.0
31+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # 6.2.0
2832
with:
2933
python-version: ${{ matrix.python-version }}
3034

3135
- name: Install uv
32-
uses: astral-sh/setup-uv@v8.0.0
36+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # 8.1.0
3337

3438
- name: Set up JDK 26
35-
uses: actions/setup-java@v5.2.0
39+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # 5.2.0
3640
with:
3741
distribution: 'temurin'
3842
java-version: '26'
3943

40-
- name: Install dependencies & build package
44+
- name: Install dependencies
4145
run: |
42-
uv pip install setuptools wheel build pytest pytest-cov --system
43-
uv build
44-
uv pip install dist/*.whl --system
46+
uv sync --group tests --frozen
4547
4648
- name: Verify installed packages
4749
run: |
4850
uv pip list
4951
5052
- name: Import language_tool_python
5153
run: |
52-
printf "import language_tool_python\n" | python
54+
printf "import language_tool_python\n" | uv run python
5355
5456
- name: Test with pytest
5557
run: |
56-
pytest
58+
uv run pytest
5759
5860
lint:
61+
timeout-minutes: 10
5962
name: Lint with Ruff
60-
runs-on: ubuntu-latest
63+
runs-on: ubuntu-24.04
6164
steps:
6265
- name: Clone repository
63-
uses: actions/checkout@v6.0.2
66+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
6467

6568
- name: Install uv
66-
uses: astral-sh/setup-uv@v8.0.0
69+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # 8.1.0
6770

6871
# Keep in sync ruff version with .pre-commit-config.yaml
6972
- name: Run Ruff Linter
@@ -72,25 +75,20 @@ jobs:
7275
uvx ruff@0.15.12 format --check .
7376
7477
type_check:
78+
timeout-minutes: 10
7579
name: Type Check with Mypy
76-
runs-on: ubuntu-latest
80+
runs-on: ubuntu-24.04
7781
steps:
7882
- name: Clone repository
79-
uses: actions/checkout@v6.0.2
83+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
8084

8185
- name: Install uv
82-
uses: astral-sh/setup-uv@v8.0.0
83-
84-
- name: Set up venv
85-
run: uv venv .venv
86+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # 8.1.0
8687

87-
- name: Install dependencies & build package
88+
- name: Install dependencies
8889
run: |
89-
. .venv/bin/activate
90-
uv pip install setuptools wheel build mypy
91-
uv build
92-
uv pip install dist/*.whl
93-
90+
uv sync --group types --frozen
91+
9492
# Keep in sync mypy version with .pre-commit-config.yaml
9593
- name: Run Mypy Type Checker
9694
run: |

0 commit comments

Comments
 (0)