Skip to content

Commit 65533a5

Browse files
cliffhallclaude
andcommitted
ci(fetch): install readabilipy's JavaScript dependencies on the Windows leg
readabilipy 0.3.0 no longer ships node_modules; it runs `npm install` on first use, but on Windows its subprocess call cannot resolve npm.cmd, so have_node() is False and every test that pins the Readability.js path fails setup. Install the dependencies explicitly before pytest. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
1 parent 5cbc134 commit 65533a5

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎.github/workflows/python.yml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,24 @@ jobs:
142142
working-directory: src/${{ matrix.package }}
143143
run: uv sync --locked --all-extras --dev
144144

145+
# fetch's tests pin readabilipy's Readability.js path, which needs Node
146+
# and readabilipy's JavaScript dependencies. readabilipy >= 0.3.0 ships
147+
# only their package.json and runs `npm install` on first use, but on
148+
# Windows its subprocess call cannot find npm (npm.cmd), so it falls back
149+
# to the pure-Python extractor. Install them here, as an operator would.
150+
- uses: actions/setup-node@v7
151+
if: matrix.package == 'fetch'
152+
with:
153+
node-version: 24
154+
155+
- name: Install readabilipy's JavaScript dependencies
156+
if: matrix.package == 'fetch'
157+
working-directory: src/fetch
158+
shell: bash
159+
run: |
160+
jsdir=$(uv run --frozen python -c "import os, readabilipy; print(os.path.join(os.path.dirname(readabilipy.__file__), 'javascript'))")
161+
cd "$jsdir" && npm install --no-audit --no-fund
162+
145163
- name: Run pytest
146164
working-directory: src/${{ matrix.package }}
147165
run: uv run --frozen pytest

0 commit comments

Comments
 (0)