From c53c8e73f99fa634acc89ddb3b6039916bfe347e Mon Sep 17 00:00:00 2001 From: Artur Klauser Date: Wed, 4 Dec 2019 10:20:31 +0100 Subject: [PATCH] Combine coverage with python 3.7 When running `coverage combine` under python 3.8, function definition lines after function decorators are marked as not executed. This issue doesn't happen with earlier versions of python, so using v3.7 instead. See https://github.com/nedbat/coveragepy/issues/866 for an explanation. --- .github/workflows/pythonpackage.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 3fb6deb..9c228e8 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -120,6 +120,12 @@ jobs: fetch-depth: 1 # no history, just HEAD - name: Set up Python uses: actions/setup-python@v1 + with: + # Python3.8 computes coverage lines differently from <=3.7, leading to + # 'def' lines after function decorators being reported as uncovered. + # See https://github.com/nedbat/coveragepy/issues/866. + # Thus we have to stick to v3.7 for coverage combine and its reporting. + python-version: 3.7 - name: Install dependencies run: | # python -m pip install --upgrade pip