Skip to content

Commit

Permalink
Use temporary dir instead of package dir in CIs to avoid shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
CAM-Gerlach committed Dec 2, 2021
1 parent 1c7f098 commit d731e2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ jobs:
COVERALLS_FLAG_NAME: ${{ matrix.os }} Python ${{ matrix.python-version }} conda=${{ matrix.use-conda }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd qtpy # Switch to test working dir per non-src-layout hack
cd temp_test_dir # Switch to test working dir per non-src-layout hack
cat qtpy_basedir.txt
pipx run coveralls --service=github --rcfile="../.coveragerc" --basedir="$(cat qtpy_basedir.txt)"
7 changes: 4 additions & 3 deletions .github/workflows/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ echo dist/*.whl | xargs -I % python -bb -X dev -W error -m pip install --upgrade
conda list

# Run tests
cd qtpy # Hack to work around non-src layout pulling in local instead of installed package for cov
python -I -bb -X dev -W error -m pytest --cov-config ../.coveragerc --cov-append
mkdir -p temp_test_dir
pushd temp_test_dir # Hack to work around non-src layout pulling in local instead of installed package for cov
python -I -bb -X dev -W error -m pytest ../qtpy --cov-config ../.coveragerc --cov-append

# Save QtPy base dir for coverage
python -c "from pathlib import Path; import qtpy; print(Path(qtpy.__file__).parent.parent.resolve().as_posix())" > qtpy_basedir.txt
cat qtpy_basedir.txt
cd ..
popd

# Check package and environment
pipx run twine check --strict dist/*
Expand Down

0 comments on commit d731e2e

Please sign in to comment.