Skip to content

Commit 844f7d4

Browse files
committed
Fix CI: run tests from /tmp to use installed package
The source diffcp/ directory was shadowing the installed package, causing 'ModuleNotFoundError: No module named diffcp._diffcp'. By running pytest from /tmp with the full path to tests, Python imports from site-packages where the compiled _diffcp extension is properly installed.
1 parent 57d4d8a commit 844f7d4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ jobs:
3232
pip install -v .[test]
3333
3434
- name: Run tests
35-
run: pytest tests/ -v
35+
run: pytest $GITHUB_WORKSPACE/tests/ -v
36+
working-directory: /tmp
3637

3738
build_wheels:
3839
name: Build wheels on ${{ matrix.os }}

0 commit comments

Comments
 (0)