diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 390530026..1aaf08711 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,11 +92,13 @@ jobs: pip install -U -c constraints.txt -r requirements-dev.txt - name: Run unit tests run: make unit-test-coverage - - name: Upload unit test coverage report - uses: actions/upload-artifact@v2 + - name: Report coverage to coveralls.io + uses: coverallsapp/github-action@1.1.3 with: - name: Unit test coverage report - python${{ matrix.python-version }}-${{ matrix.os }} - path: htmlcov + github-token: ${{ secrets.GITHUB_TOKEN }} + flag-name: unit-tests_python${{ matrix.python-version }}-${{ matrix.os }} + parallel: true + path-to-lcov: coverage.lcov integration-tests: if: ${{ github.event_name == 'push' }} # only kick-off resource intensive integration tests if unit tests and all basic checks succeeded @@ -133,8 +135,21 @@ jobs: pip install -U -c constraints.txt -r requirements-dev.txt - name: Run integration tests run: make integration-test-coverage - - name: Upload integration test coverage report - uses: actions/upload-artifact@v2 + - name: Report coverage to coveralls.io + uses: coverallsapp/github-action@1.1.3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + flag-name: integration-tests_${{ matrix.environment }} + parallel: true + path-to-lcov: coverage.lcov + tests-finished: + if: ${{ always() }} + name: Submit code coverage metrics + needs: [ unit-tests, integration-tests ] + runs-on: ubuntu-latest + steps: + - name: Notify coveralls.io that all parallel tests have finished + uses: coverallsapp/github-action@1.1.3 with: - name: Integration test coverage report - ${{ matrix.environment }} - path: htmlcov \ No newline at end of file + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true \ No newline at end of file diff --git a/Makefile b/Makefile index ee9a7f713..13c22a5e8 100644 --- a/Makefile +++ b/Makefile @@ -34,15 +34,15 @@ e2e-test: unit-test-coverage: coverage run -m unittest discover --verbose --top-level-directory . --start-directory test/unit - coverage html + coverage lcov integration-test-coverage: coverage run -m unittest discover --verbose --top-level-directory . --start-directory test/integration - coverage html + coverage lcov e2e-test-coverage: coverage run -m unittest discover --verbose --top-level-directory . --start-directory test/e2e - coverage html + coverage lcov black: black qiskit_ibm_runtime setup.py test docs/tutorials program_source \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt index 803148002..abae8342d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -24,7 +24,7 @@ qiskit-aer websockets>=8 scikit-quant;platform_system != 'Windows' black==21.11b1 -coverage>=6.2 +coverage>=6.3 pylatexenc mthree sklearn