@@ -106,17 +106,56 @@ jobs:
106106 --mypy-config-file ../pyproject.toml \
107107 sift_client.resources.sync_stubs
108108
109+ # Smoke-test that the package installs on Windows. The full test/lint suite
110+ # only runs on Linux (see test-python); this job exists to catch
111+ # Windows-specific install regressions (e.g. a new dep without a Windows
112+ # wheel) without doubling CI time.
113+ install-python-windows :
114+ needs : [changes]
115+ if : |
116+ always() &&
117+ (github.event_name != 'pull_request' || needs.changes.outputs.python == 'true')
118+ runs-on : windows-latest
119+ defaults :
120+ run :
121+ working-directory : python
122+ # Use bash so the same '.[dev-all]' quoting works as on Linux;
123+ # windows-latest ships Git Bash.
124+ shell : bash
125+ steps :
126+ - name : Checkout code
127+ uses : actions/checkout@v4
128+ with :
129+ ref : ${{ github.event.pull_request.head.sha }}
130+
131+ - name : Set up Python
132+ uses : actions/setup-python@v2
133+ with :
134+ python-version : " 3.8"
135+
136+ - name : Pip install
137+ run : |
138+ python -m pip install --upgrade pip
139+ pip install '.[dev-all]'
140+
109141 python-ci-status :
110142 if : always()
111- needs : [changes, test-python]
143+ needs : [changes, test-python, install-python-windows ]
112144 runs-on : ubuntu-latest
113145 steps :
114146 - name : Check result
115147 run : |
116- result="${{ needs.test-python.result }}"
117- if [[ "$result" == "success" || "$result" == "skipped" ]]; then
118- echo "python-ci passed (test-python: $result)"
148+ test_result="${{ needs.test-python.result }}"
149+ win_result="${{ needs.install-python-windows.result }}"
150+ fail=0
151+ for r in "$test_result" "$win_result"; do
152+ if [[ "$r" != "success" && "$r" != "skipped" ]]; then
153+ fail=1
154+ fi
155+ done
156+ if [[ "$fail" -eq 0 ]]; then
157+ echo "python-ci passed (test-python: $test_result, install-python-windows: $win_result)"
119158 else
120- echo "python-ci failed (test-python: $result )"
159+ echo "python-ci failed (test-python: $test_result, install-python-windows: $win_result )"
121160 exit 1
122161 fi
0 commit comments