Repository: spyder-ide/qtpy (language: python)

Issue:
Coveralls config needs to be updated
Not totally sure why but seems like the coverage reports started to be handled differently. After doing a merge with master a bunch of failed checks appeared: https://github.com/spyder-ide/qtpy/commit/bc7a3c746c88ea3e5d8f02818763636bae807523 

Checking the coveralls page seems like now the coverage is associated to the path where the report is located instead of being aggregated?:

![image](https://user-images.githubusercontent.com/16781833/231014486-22fb9a41-7e5e-496e-adc0-38a84a4a3961.png)

Could this be related with the change to use mamba or could it be related with some updates on the Coveralls tools that require for us to update the coverage upload config? What do you think @CAM-Gerlach?


Discussion / hints:
As far as I'm aware, it was entirely independent as a problem was initially reported on https://github.com/spyder-ide/qtpy/pull/421#issuecomment-1500093992 where the coverage dropped a bunch and the check was failing, and now that check is not appearing in the checks list at all for any recent-ish PRs (even before that change). And I'm not aware of any mechanism by which the mamba change could have influenced it as it doesn't use mamba at all, it uses its own isolated pipx environment (since PR #268 ). I did change the `bash` invocation for its step to use `-e`, so that any error would be reported, but it shouldn't have any effect on the functioning of the check and the issue had apparently happened prior to that.

So, I'm really not sure; I'm not an expert at coveralls (or coverage checks in general) as I don't really use them much myself, and with everything else on my plate right now I'm not sure how much time I have to muck with it more at the moment after not seeing any obvious indication of what's going on in the build logs.

Fix patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 761d60f7..a45ddc48 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -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


Test patch:
diff --git a/.github/workflows/test.sh b/.github/workflows/test.sh
index 5e87543e..bd287eb0 100755
--- a/.github/workflows/test.sh
+++ b/.github/workflows/test.sh
@@ -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/*
diff --git a/pytest.ini b/pytest.ini
index 19e23c3b..2892105e 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -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