Skip to content

Commit 5f1f07f

Browse files
ci(windows): add minimal Windows pytest workflow (Python 3.9) to guard against regressions
1 parent 29cfe07 commit 5f1f07f

File tree

3 files changed

+36
-7
lines changed

3 files changed

+36
-7
lines changed

.github/workflows/windows-test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Windows - Smoke Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
windows-tests:
9+
runs-on: windows-latest
10+
timeout-minutes: 20
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v5
14+
with:
15+
submodules: true
16+
- name: Set up Python 3.9
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.9'
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install -r requirements.txt -r test-requirements.txt
24+
- name: Run pytest (exclude e2e)
25+
run: |
26+
python -m pytest -k "not e2e" --maxfail=10 -q

kubernetes/base/config/kube_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
# kubernetes.config shim during Windows dynamic module registration.
4040
from .exec_provider import ExecProvider # type: ignore
4141
except ImportError: # fallback for legacy absolute path
42-
from kubernetes.config.exec_provider import ExecProvider # noqa: F401
42+
from .exec_provider import ExecProvider # type: ignore
4343

4444
from .config_exception import ConfigException
4545
from .dateutil import UTC, format_rfc3339, parse_rfc3339

kubernetes/base/leaderelection/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
## Leader Election Example
1+
# Leader Election Example
2+
23
This example demonstrates how to use the leader election library.
34

45
## Running
5-
Run the following command in multiple separate terminals preferably an odd number.
6+
7+
Run the following command in multiple separate terminals preferably an odd number.
68
Each running process uses a unique identifier displayed when it starts to run.
79

8-
- When a program runs, if a lock object already exists with the specified name,
9-
all candidates will start as followers.
10-
- If a lock object does not exist with the specified name then whichever candidate
10+
- When a program runs, if a lock object already exists with the specified name,
11+
all candidates will start as followers.
12+
- If a lock object does not exist with the specified name then whichever candidate
1113
creates a lock object first will become the leader and the rest will be followers.
12-
- The user will be prompted about the status of the candidates and transitions.
14+
- The user will be prompted about the status of the candidates and transitions.
1315

1416
### Command to run
17+
1518
```python example.py```
1619

1720
Now kill the existing leader. You will see from the terminal outputs that one of the

0 commit comments

Comments
 (0)