Skip to content

Commit d9dd9e2

Browse files
authored
add CI workflows
1 parent 085968b commit d9dd9e2

File tree

5 files changed

+42
-26
lines changed

5 files changed

+42
-26
lines changed

.github/workflows/pr.yml

+24-22
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
jobs:
15-
changes:
16-
runs-on: ubuntu-latest
17-
permissions:
18-
pull-requests: read
19-
outputs:
20-
python: ${{ steps.filter.outputs.python }}
21-
steps:
22-
- uses: dorny/paths-filter@v3
23-
id: filter
24-
with:
25-
filters: |
26-
python:
27-
- '**/*.py'
28-
- 'pyproject.toml'
15+
# changes:
16+
# runs-on: ubuntu-latest
17+
# permissions:
18+
# pull-requests: read
19+
# outputs:
20+
# python: ${{ steps.filter.outputs.python }}
21+
# steps:
22+
# - uses: dorny/paths-filter@v3
23+
# id: filter
24+
# with:
25+
# filters: |
26+
# python:
27+
# - '**/*.py'
28+
# - 'pyproject.toml'
2929

3030
test-python:
3131
runs-on: ${{ matrix.os }}
@@ -34,25 +34,27 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
py: ['3.11', '3.12']
37-
os: [ubuntu-latest, macos-latest, windows-latest]
37+
# not today, windows-latest
38+
os: [ubuntu-latest, macos-latest]
3839

39-
needs: changes
40-
if: needs.changes.outputs.python == 'true'
40+
# needs: changes
41+
# if: needs.changes.outputs.python == 'true'
4142
steps:
4243
- uses: actions/checkout@v4
43-
- uses: eifinger/setup-rye@v3
44+
- uses: eifinger/setup-rye@v4 # replaces setup-python
4445
id: setup-rye
4546
with:
46-
version: '0.34.0'
47+
version: '0.39.0'
4748
- run: rye pin ${{ matrix.py }}
4849
- name: Sync
50+
shell: pwsh
4951
run: |
5052
rye sync
51-
if [[ $(git diff --stat requirements.lock) != '' ]]; then
52-
echo 'Rye lockfile not up-to-date'
53+
if (git diff --stat requirements.lock) {
54+
Write-Output 'Rye lockfile not up-to-date'
5355
git diff requirements.lock
5456
exit 1
55-
fi
57+
}
5658
- run: rye fmt --check
5759
- run: rye lint
5860
- run: rye run check

pyproject.toml

+5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ build-backend = "pdm.backend"
2525

2626
[tool.rye]
2727
managed = true
28+
29+
# switch to true to generate cross-platform lockfiles when we support Windows
30+
# which we don't
31+
universal = false
32+
2833
dev-dependencies = [
2934
"pyright>=1.1.377",
3035
"pytest>=8.3.2",

requirements-dev.lock

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@
77
# all-features: false
88
# with-sources: false
99
# generate-hashes: false
10-
# universal: false
10+
# universal: true
1111

1212
-e file:.
1313
click==8.1.7
1414
# via jsi
15+
colorama==0.4.6 ; sys_platform == 'win32' or platform_system == 'Windows'
16+
# via click
17+
# via loguru
18+
# via pytest
1519
humanize==4.10.0
1620
# via jsi
1721
iniconfig==2.0.0
@@ -37,3 +41,5 @@ pyright==1.1.378
3741
pytest==8.3.2
3842
rich==13.8.1
3943
# via jsi
44+
win32-setctime==1.1.0 ; sys_platform == 'win32'
45+
# via loguru

requirements.lock

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ psutil==6.0.0
2626
# via jsi
2727
pygments==2.18.0
2828
# via rich
29-
pyright==1.1.378
29+
pyright==1.1.382.post0
3030
# via jsi
3131
rich==13.8.1
3232
# via jsi
33+
typing-extensions==4.12.2
34+
# via pyright

tests/test_process_control.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def test_cmd_options():
8181
stderr="boop",
8282
)
8383
command.start()
84-
stdout, stderr = command.communicate(timeout=0.1)
84+
stdout, stderr = command.communicate(timeout=0.2)
8585

8686
print(f"{stdout=}")
8787
print(f"{stderr=}")
@@ -165,7 +165,8 @@ def test_delayed_start_real_time():
165165
assert not command.started()
166166
assert not command.done()
167167

168-
time.sleep(0.2)
168+
# give it some time to complete (allow some wiggle room for slow CI)
169+
time.sleep(0.4)
169170
assert command.started()
170171
assert command.done()
171172
assert command.returncode == 0

0 commit comments

Comments
 (0)