From 5518837cbc198cdf7d48da5b602dcba93fb7ec3f Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Tue, 10 Sep 2024 03:00:56 +0200 Subject: [PATCH] Run `nox -s test-docstrings` on GitHub actions The xdoctest integration in pytest (see tests/test_docstrings.py) is prone to miss docstrings in new source files as they must be included in the test case explicitly. So, to play it safe, we run the nox session "test-docstrings" on CI. --- .github/workflows/test_docstrings.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/test_docstrings.yml diff --git a/.github/workflows/test_docstrings.yml b/.github/workflows/test_docstrings.yml new file mode 100644 index 0000000..cc55589 --- /dev/null +++ b/.github/workflows/test_docstrings.yml @@ -0,0 +1,21 @@ +name: test-docstrings +on: push +jobs: + test-docstrings: + runs-on: ubuntu-latest + name: test-docstrings + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.12 + architecture: x64 + + - run: python --version + - run: pip --version + + # The following pinned dependencies must be updated manually + - run: pip install nox==2024.4.15 + - run: pip install poetry==1.8.3 + + - run: nox -s test-docstrings