Skip to content

Commit 865fb47

Browse files
authored
PR: Update coveralls config (CI) (#428)
2 parents b3b222a + 5f95725 commit 865fb47

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,19 @@ jobs:
160160
if: always() && (! (matrix.skip-pyside6))
161161
run: ./.github/workflows/test.sh pyside6
162162
- name: Upload coverage data to coveralls.io
163-
shell: bash -e {0}
164-
env:
165-
COVERALLS_FLAG_NAME: ${{ matrix.os }} Python ${{ matrix.python-version }} conda=${{ matrix.use-conda }}
166-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
167-
run: |
168-
cd temp_test_dir # Switch to test working dir per non-src-layout hack
169-
cat qtpy_basedir.txt
170-
pipx run coveralls --service=github --rcfile="../.coveragerc" --basedir="$(cat qtpy_basedir.txt)"
163+
uses: coverallsapp/github-action@v2
164+
with:
165+
parallel: true
166+
flag-name: ${{ matrix.os }} Python ${{ matrix.python-version }} conda=${{ matrix.use-conda }}
167+
github-token: ${{ secrets.GITHUB_TOKEN }}
168+
debug: true
169+
finish:
170+
name: Finish Coveralls
171+
needs: test
172+
if: ${{ always() }}
173+
runs-on: ubuntu-latest
174+
steps:
175+
- name: Mark Coveralls finished
176+
uses: coverallsapp/github-action@v2
177+
with:
178+
parallel-finished: true

.github/workflows/test.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,7 @@ echo dist/*.whl | xargs -I % python -bb -X dev -W error -W "ignore::DeprecationW
9494
mamba list
9595

9696
# Run tests
97-
mkdir -p temp_test_dir
98-
pushd temp_test_dir # Hack to work around non-src layout pulling in local instead of installed package for cov
99-
python -I -bb -X dev -W error -m pytest ../qtpy --cov-config ../.coveragerc --cov-append
100-
101-
# Save QtPy base dir for coverage
102-
python -c "from pathlib import Path; import qtpy; print(Path(qtpy.__file__).parent.parent.resolve().as_posix())" > qtpy_basedir.txt
103-
cat qtpy_basedir.txt
104-
popd
97+
python -I -bb -X dev -W error -m pytest --cov qtpy --cov-config .coveragerc --cov-append
10598

10699
# Check package and environment
107100
pipx run twine check --strict dist/*

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[pytest]
2-
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
2+
addopts = --durations=10 -v -r a --color=yes --code-highlight=yes --strict-config --strict-markers --maxfail 10 --cov-report=term-missing
33
empty_parameter_set_mark = fail_at_collect
44
filterwarnings =
55
error

0 commit comments

Comments
 (0)