diff --git a/.github/workflows/actions/merge-cov/action.yml b/.github/workflows/actions/merge-cov/action.yml index 89c90c57ce..736eb7e958 100644 --- a/.github/workflows/actions/merge-cov/action.yml +++ b/.github/workflows/actions/merge-cov/action.yml @@ -33,9 +33,18 @@ runs: # different parallelized runs - name: Merge coverage reports shell: bash + # NOTE: Merging code reports generated from self-hosted (aml) runners can be problematic + # as reports may reference the source code at an unresolvable absolute path. + # For example, you may encounter errors like: + # "CoverageWarning: Couldn't parse + # '/home/azureuser/runner/work/recommenders/recommenders/recommenders/evaluation/__init__.py': + # No source for code" + # Work-around: Creating a symlink at the root that points to the default local runner folder: '/home/runner/work/recommenders' run: | + sudo mkdir -p /home/azureuser + sudo ln -s /home/runner /home/azureuser/runner python -m coverage combine .coverage* - python -m coverage report + python -m coverage report -i python -m coverage xml -i - name: Show merged report diff --git a/.github/workflows/pr-gate.yml b/.github/workflows/pr-gate.yml index 228dd4b25a..e1803a9b44 100644 --- a/.github/workflows/pr-gate.yml +++ b/.github/workflows/pr-gate.yml @@ -176,7 +176,10 @@ jobs: # different kinds of tests are located in tests/ folders test-kind: ['unit'] # pytest markers configured in tox.ini. See https://docs.pytest.org/en/6.2.x/example/markers.html - test-marker: ['gpu and notebooks and not spark and not experimental', 'gpu and not notebooks and not spark and not experimental'] + test-marker: [ + 'gpu and not notebooks and not spark and not experimental', + 'gpu and notebooks and not spark and not experimental' + ] steps: - uses: actions/checkout@v2 diff --git a/tox.ini b/tox.ini index 45e8df70a1..0a063e1b67 100644 --- a/tox.ini +++ b/tox.ini @@ -64,6 +64,7 @@ markers = # See https://docs.pytest.org/en/stable/example/markers.html#registering-markers deeprec: test deeprec model sequential: test sequential model + experimental: mark a test that has advanced build requirements or might conflict with libraries from other options notebooks: mark a test as notebooks test smoke: mark a test as smoke test integration: mark a test as integration test