Skip to content

Commit

Permalink
PR: Update coveralls config (CI) (#428)
Browse files Browse the repository at this point in the history
  • Loading branch information
dalthviz authored Nov 3, 2023
2 parents b3b222a + 5f95725 commit 865fb47
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,19 @@ jobs:
if: always() && (! (matrix.skip-pyside6))
run: ./.github/workflows/test.sh pyside6
- name: Upload coverage data to coveralls.io
shell: bash -e {0}
env:
COVERALLS_FLAG_NAME: ${{ matrix.os }} Python ${{ matrix.python-version }} conda=${{ matrix.use-conda }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
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)"
uses: coverallsapp/github-action@v2
with:
parallel: true
flag-name: ${{ matrix.os }} Python ${{ matrix.python-version }} conda=${{ matrix.use-conda }}
github-token: ${{ secrets.GITHUB_TOKEN }}
debug: true
finish:
name: Finish Coveralls
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Mark Coveralls finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
9 changes: 1 addition & 8 deletions .github/workflows/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,7 @@ echo dist/*.whl | xargs -I % python -bb -X dev -W error -W "ignore::DeprecationW
mamba list

# Run tests
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
popd
python -I -bb -X dev -W error -m pytest --cov qtpy --cov-config .coveragerc --cov-append

# Check package and environment
pipx run twine check --strict dist/*
Expand Down
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[pytest]
addopts = --durations=10 -v -r a --color=yes --code-highlight=yes --strict-config --strict-markers --import-mode=importlib --maxfail 10 --cov=qtpy --cov-report=term-missing
addopts = --durations=10 -v -r a --color=yes --code-highlight=yes --strict-config --strict-markers --maxfail 10 --cov-report=term-missing
empty_parameter_set_mark = fail_at_collect
filterwarnings =
error
Expand Down

0 comments on commit 865fb47

Please sign in to comment.