From 9e71b8255819c8aaacf95885e146dae783b31b11 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Wed, 22 May 2024 09:23:58 +0100 Subject: [PATCH] Devops: Fix the `test-install.yml` workflow (#6409) * The `uses` key requires full relative path when using a local path to include, i.e., the leading `./` is required in the following: used: `./.github/actions/install-aiida-core * The action `upload-artifact@v4` no longer supports uploading multiple files with the same name, so they now include the Python version. * The Sphinx extension test is made more robust by making it insensitive to the version of docutils used. --- .github/workflows/test-install.yml | 9 +++++---- tests/sphinxext/test_workchain.py | 1 + tests/sphinxext/test_workchain/test_workchain_build.xml | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-install.yml b/.github/workflows/test-install.yml index c72c1f4ba6..c0d0ab12d9 100644 --- a/.github/workflows/test-install.yml +++ b/.github/workflows/test-install.yml @@ -216,10 +216,10 @@ jobs: run: sudo apt update && sudo apt install postgresql graphviz - name: Install aiida-core - uses: .github/actions/install-aiida-core + uses: ./.github/actions/install-aiida-core with: python-version: ${{ matrix.python-version }} - extras: '[atomic_tools, docs, notebook, rest, tests, tui]' + extras: '[atomic_tools,docs,notebook,rest,tests,tui]' from-requirements: 'false' - name: Setup AiiDA environment @@ -239,7 +239,7 @@ jobs: # updating the requirements (in case they are inconsistent with the pyproject.toml file). - uses: actions/upload-artifact@v4 with: - name: requirements.txt + name: requirements-py-${{ matrix.python-version }}.txt path: requirements-py-${{ matrix.python-version }}.txt # Check whether the requirements/ files are consistent with the dependency specification in the pyproject.toml file. @@ -293,7 +293,8 @@ jobs: if: steps.check_reqs.outcome == 'Failure' # only run if requirements/ are inconsistent uses: actions/download-artifact@v4 with: - name: requirements.txt + pattern: requirements-py-* + merge-multiple: true path: requirements - name: Commit requirements files diff --git a/tests/sphinxext/test_workchain.py b/tests/sphinxext/test_workchain.py index cf114e3896..a88d9dc300 100644 --- a/tests/sphinxext/test_workchain.py +++ b/tests/sphinxext/test_workchain.py @@ -24,6 +24,7 @@ def test_workchain_build(sphinx_build_factory, file_regression): # Need to remove the ``source`` attribute of the ``document`` tag as that is variable. output = (sphinx_build.outdir / 'index.xml').read_text() output = re.sub(r'source=".*"', '', output) + output = re.sub(r'', '', output) file_regression.check(output, encoding='utf-8', extension='.xml') diff --git a/tests/sphinxext/test_workchain/test_workchain_build.xml b/tests/sphinxext/test_workchain/test_workchain_build.xml index 20ca79ea9c..f7a8c30cac 100644 --- a/tests/sphinxext/test_workchain/test_workchain_build.xml +++ b/tests/sphinxext/test_workchain/test_workchain_build.xml @@ -1,6 +1,6 @@ - +
sphinx-aiida demo