From 0f8dfe87b6d878f63848f67a16ac609d4893af0e Mon Sep 17 00:00:00 2001 From: Stefano Carrazza Date: Fri, 8 Oct 2021 21:14:34 +0200 Subject: [PATCH 1/3] adding doctest rule --- .github/workflows/rules.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rules.yml b/.github/workflows/rules.yml index d64c103d45..511d9137f3 100644 --- a/.github/workflows/rules.yml +++ b/.github/workflows/rules.yml @@ -30,7 +30,7 @@ jobs: run: | python -m pip install --upgrade pip pip install pytest-cov - pip install .[tests] + pip install .[tests,docs] pip install qibotf pip install qibojit - name: Install package on Windows @@ -38,7 +38,7 @@ jobs: run: | python -m pip install --upgrade pip pip install pytest-cov - pip install .[qibojit,tests] + pip install .[qibojit,tests,docs] - name: Test with pylint run: | pip install pylint @@ -46,6 +46,9 @@ jobs: - name: Test with pytest core run: | pytest --cov=qibo --cov-report=xml --pyargs qibo + - name: Test documentation examples + run: | + make -C doc doctest - name: Test examples if: startsWith(matrix.os, 'ubuntu') && matrix.python-version == '3.9' run: | From 80b9ba3299d7653b7eca1682e58252db7e37044b Mon Sep 17 00:00:00 2001 From: Stefano Carrazza Date: Fri, 8 Oct 2021 21:27:52 +0200 Subject: [PATCH 2/3] limiting test to ubuntu --- .github/workflows/rules.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rules.yml b/.github/workflows/rules.yml index 511d9137f3..ca4fb5acb4 100644 --- a/.github/workflows/rules.yml +++ b/.github/workflows/rules.yml @@ -47,6 +47,7 @@ jobs: run: | pytest --cov=qibo --cov-report=xml --pyargs qibo - name: Test documentation examples + if: startsWith(matrix.os, 'ubuntu') && matrix.python-version == '3.9' run: | make -C doc doctest - name: Test examples From 4b129b055e586e4489f63deaf560a0970361ea6a Mon Sep 17 00:00:00 2001 From: Stefano Carrazza Date: Fri, 8 Oct 2021 21:42:19 +0200 Subject: [PATCH 3/3] adding pandoc install --- .github/workflows/rules.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rules.yml b/.github/workflows/rules.yml index ca4fb5acb4..9bc0609c1e 100644 --- a/.github/workflows/rules.yml +++ b/.github/workflows/rules.yml @@ -49,6 +49,7 @@ jobs: - name: Test documentation examples if: startsWith(matrix.os, 'ubuntu') && matrix.python-version == '3.9' run: | + sudo apt install pandoc make -C doc doctest - name: Test examples if: startsWith(matrix.os, 'ubuntu') && matrix.python-version == '3.9'