Skip to content

Commit 9d27a6a

Browse files
committed
CI: Upload coverage via Coveralls GitHub Action
1 parent 06ba03b commit 9d27a6a

File tree

3 files changed

+9
-19
lines changed

3 files changed

+9
-19
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,12 @@ 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_PARALLEL: true
166-
COVERALLS_FLAG_NAME: ${{ matrix.os }} Python ${{ matrix.python-version }} conda=${{ matrix.use-conda }}
167-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
168-
run: |
169-
cd temp_test_dir # Switch to test working dir per non-src-layout hack
170-
cat qtpy_basedir.txt
171-
pipx run coveralls --service=github --rcfile="../.coveragerc" --basedir="../qtpy"
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
172169
finish:
173170
needs: test
174171
if: ${{ always() }}
@@ -177,4 +174,4 @@ jobs:
177174
- name: Coveralls Finished
178175
uses: coverallsapp/github-action@v2
179176
with:
180-
parallel-finished: true
177+
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)