Skip to content

Commit 1f16fe5

Browse files
committed
Fix ci for win
1 parent 7b37183 commit 1f16fe5

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/test.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,22 @@ jobs:
2222
- '3.13'
2323
steps:
2424
- uses: actions/checkout@v4
25+
- uses: actions/setup-java@v4
26+
with:
27+
distribution: temurin
28+
java-version: '21'
2529
- name: Install poetry
2630
run: pipx install poetry
2731
- uses: actions/setup-python@v5
2832
with:
2933
python-version: ${{ matrix.python-version }}
3034
cache: poetry
3135
- name: Setup
36+
shell: bash
3237
run: |
3338
poetry install --no-interaction
34-
poetry run task download-latest-jar
39+
export DOWNLOAD_LATEST_ONLY=1
40+
poetry run task publish
3541
- name: Test
3642
run: |
3743
poetry run task test

tests/test_cli.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import os
34
import re
45
from typing import TYPE_CHECKING
56

@@ -14,7 +15,7 @@ def test_cli_version(capfd: pytest.CaptureFixture[str]) -> None:
1415
assert result.returncode == 0
1516

1617
captured = capfd.readouterr()
17-
assert re.match(r"^\d+\.\d+\.\d+(?:-beta\d*)?$", captured.out.split("\n")[0])
18+
assert re.match(r"^\d+\.\d+\.\d+(?:-beta\d*)?$", captured.out.split(os.linesep)[0])
1819
assert not captured.err
1920

2021

@@ -40,4 +41,4 @@ def test_invalid_arg(capfd: pytest.CaptureFixture[str]) -> None:
4041

4142
captured = capfd.readouterr()
4243
assert not captured.out
43-
assert "Found unexpected parameters: [--invalid-arg-404]" in captured.err.split("\n")[0]
44+
assert "Found unexpected parameters: [--invalid-arg-404]" in captured.err.split(os.linesep)[0]

0 commit comments

Comments
 (0)