From 65a4da21993f827a7f83c46e59fe1b4053d9c1fc Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Fri, 6 Sep 2024 16:10:15 +0200 Subject: [PATCH 01/19] refactor: use virtual environment to be consistent --- _doc-build-linux/action.yml | 91 ++++++++++++++++++++++++++------ _doc-build-windows/action.yml | 81 +++++++++++++++++++++------- check-vulnerabilities/action.yml | 71 ++++++++++++++++++++++++- code-style/action.yml | 66 ++++++++++++++++++----- doc-build/action.yml | 5 ++ tests-pytest/action.yml | 73 ++++++++++++++++++++----- 6 files changed, 322 insertions(+), 65 deletions(-) diff --git a/_doc-build-linux/action.yml b/_doc-build-linux/action.yml index d25c9fb2c..a4f543923 100644 --- a/_doc-build-linux/action.yml +++ b/_doc-build-linux/action.yml @@ -179,56 +179,111 @@ runs: sudo apt-get update sudo apt-get install -y poppler-utils - - name: "Check if requirements.txt file exists" + # ------------------------------------------------------------------------ + + - uses: ansys/actions/_logging@main + with: + level: "INFO" + message: > + Determine context. + + - name: "Determine Github environnement variables" shell: bash run: | - echo "EXISTS_DOC_REQUIREMENTS=$(if [ -f ${{ inputs.requirements-file }} ]; then echo 'true'; else echo 'false'; fi)" >> $GITHUB_ENV + if [[ -f "pyproject.toml" ]] && grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then + echo "BUILD_BACKEND=$(echo 'poetry')" >> $GITHUB_ENV + echo "SPHINX_BUILD_MAKE=$(echo 'poetry run -- make')" >> $GITHUB_ENV + else + echo "BUILD_BACKEND=$(echo 'pip')" >> $GITHUB_ENV + echo "SPHINX_BUILD_MAKE=$(echo 'make')" >> $GITHUB_ENV + + - uses: ansys/actions/_logging@main + with: + level: "INFO" + message: > + Build backend: ${{ env.BUILD_BACKEND }} + Sphinx build make: ${{ SPHINX_BUILD_MAKE }} + + # ------------------------------------------------------------------------ + + - uses: ansys/actions/_logging@main + with: + level: "INFO" + message: > + Set up python to build the documentation. - - name: "Print previous output" + - name: "Set poetry environment variable(s) (if required)" shell: bash + if: env.BUILD_BACKEND == 'poetry' run: | - echo "Output was found ${{ env.EXISTS_DOC_REQUIREMENTS }}" + # For projects using poetry, do not use a virtual environment. + # Poetry uses virtual environments to install its dependencies, but this might + # lead to problems if it is not activated prior to executing poetry commands. + # Store POETRY_VIRTUALENVS_CREATE=false in the GitHub environment to prevent + # poetry from creating a virtual environment. + # + echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENV - name: "Update pip" shell: bash - run: python -m pip install -U pip + run: | + source .venv/bin/activate + python -m pip install -U pip + + - name: "Check if requirements.txt file exists" + shell: bash + run: | + echo "EXISTS_DOC_REQUIREMENTS=$(if [ -f ${{ inputs.requirements-file }} ]; then echo 'true'; else echo 'false'; fi)" >> $GITHUB_ENV - name: "Install documentation dependencies from requirements file" shell: bash if: env.EXISTS_DOC_REQUIREMENTS == 'true' run: | + source .venv/bin/activate python -m pip install -r ${{ inputs.requirements-file }} + - name: "Install poetry (if required)" + shell: bash + if: env.BUILD_BACKEND == 'poetry' + run: | + source .venv/bin/activate + python -m pip install poetry + - name: "Install Python library" shell: bash if: inputs.skip-install == 'false' run: | - python -m pip install . + source .venv/bin/activate + if [[ ${{ env.BUILD_BACKEND }} == 'poetry' ]]; then + poetry install + else + python -m pip install . + fi - name: "Install documentation dependencies from pyproject.toml" shell: bash if: env.EXISTS_DOC_REQUIREMENTS == 'false' run: | - if grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then - python -m pip install poetry + source .venv/bin/activate + if [[ ${{ env.BUILD_BACKEND }} == 'poetry' ]]; then poetry install --with doc else - python -m pip install .[doc] + python -m pip install .[doc] ${{ env.PYTHON_NO_CACHE_OPTION }} fi - - name: "Determine make command context" - shell: bash - run: | - if [[ -f "pyproject.toml" ]] && grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then - echo "SPHINX_BUILD_MAKE=$(echo 'poetry run -- make')" >> $GITHUB_ENV - else - echo "SPHINX_BUILD_MAKE=$(echo 'make')" >> $GITHUB_ENV - fi + # ------------------------------------------------------------------------ + + - uses: ansys/actions/_logging@main + with: + level: "INFO" + message: > + Build HTML, PDF and JSON documentation. - name: "Build HTML, PDF, and JSON documentation" if: inputs.requires-xvfb == 'false' shell: bash run: | + source .venv/bin/activate ${{ env.SPHINX_BUILD_MAKE }} -C doc html SPHINXOPTS="${{ inputs.sphinxopts }}" ${{ env.SPHINX_BUILD_MAKE }} -C doc pdf if [[ ${{ inputs.check-links }} == 'true' ]]; @@ -244,6 +299,7 @@ runs: if: inputs.requires-xvfb == 'true' shell: bash run: | + source .venv/bin/activate xvfb-run ${{ env.SPHINX_BUILD_MAKE }} -C doc html SPHINXOPTS="${{ inputs.sphinxopts }}" xvfb-run ${{ env.SPHINX_BUILD_MAKE }} -C doc pdf if [[ ${{ inputs.check-links }} == 'true' ]]; @@ -268,6 +324,7 @@ runs: if: ${{ inputs.add-pdf-html-docs-as-assets == 'true' }} shell: bash run: | + source .venv/bin/activate python ${{ github.action_path }}/../doc-build/parse_doc_conf.py - uses: ansys/actions/_logging@main diff --git a/_doc-build-windows/action.yml b/_doc-build-windows/action.yml index b59f9fce2..43717307f 100644 --- a/_doc-build-windows/action.yml +++ b/_doc-build-windows/action.yml @@ -211,47 +211,95 @@ runs: # ------------------------------------------------------------------------ + - uses: ansys/actions/_logging@main + with: + level: "INFO" + message: > + Determine context. + + - name: "Determine Github environnement variables" + shell: powershell + run: | + if ((Test-Path "pyproject.toml") -and (Get-Content "pyproject.toml" | Select-String -Pattern 'build-backend = "poetry\.core\.masonry\.api"')) { + echo "BUILD_BACKEND=$(echo 'poetry')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "SPHINX_BUILD_MAKE=$(echo 'poetry run -- doc\make.bat')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + } else { + echo "BUILD_BACKEND=$(echo 'pip')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "SPHINX_BUILD_MAKE=$(echo 'doc\make.bat')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + } + + - uses: ansys/actions/_logging@main + with: + level: "INFO" + message: > + Build backend: ${{ env.BUILD_BACKEND }} + Sphinx build make: ${{ SPHINX_BUILD_MAKE }} + + # ------------------------------------------------------------------------ + - uses: ansys/actions/_logging@main with: level: "INFO" message: > Set up python to build the documentation. - - name: "Update pip" + - name: "Set poetry environment variable(s) (if required)" shell: powershell - run: python -m pip install -U pip + if: env.BUILD_BACKEND == 'poetry' + run: | + # For projects using poetry, do not use a virtual environment. + # Poetry uses virtual environments to install its dependencies, but this might + # lead to problems if it is not activated prior to executing poetry commands. + # Store POETRY_VIRTUALENVS_CREATE=false in the GitHub environment to prevent + # poetry from creating a virtual environment. + # + echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENV - - name: Check if requirements.txt file exists + - name: "Update pip" shell: powershell run: | - echo "EXISTS_DOC_REQUIREMENTS=$(if (Test-Path '${{ inputs.requirements-file }}') { echo 'true' } else { echo 'false' })" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 + .venv\Scripts\Activate.ps1 + python -m pip install -U pip - - name: Print previous output + - name: Check if requirements.txt file exists shell: powershell run: | - echo "Output was found ${{ env.EXISTS_DOC_REQUIREMENTS }}" + echo "EXISTS_DOC_REQUIREMENTS=$(if (Test-Path '${{ inputs.requirements-file }}') { echo 'true' } else { echo 'false' })" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 - name: Install documentation dependencies from requirements file shell: powershell if: ${{ env.EXISTS_DOC_REQUIREMENTS == 'true' }} run: | + .venv\Scripts\Activate.ps1 python -m pip install -r ${{ inputs.requirements-file }} + - name: "Install poetry (if required)" + shell: bash + if: env.BUILD_BACKEND == 'poetry' + run: | + .venv\Scripts\Activate.ps1 + python -m pip install poetry + - name: Install Python library shell: powershell if: ${{ inputs.skip-install == 'false' }} run: | - python -m pip install . + .venv\Scripts\Activate.ps1 + if ("${{ env.BUILD_BACKEND }}" -eq 'poetry' ) { + poetry install + } else { + python -m pip install . + } - name: Install documentation dependencies from pyproject.toml shell: powershell if: ${{ env.EXISTS_DOC_REQUIREMENTS == 'false' }} run: | - if (Get-Content "pyproject.toml" | Select-String -Pattern 'build-backend = "poetry\.core\.masonry\.api"') { - python -m pip install poetry - poetry install --with doc + .venv\Scripts\Activate.ps1 + if ("${{ env.BUILD_BACKEND }}" -eq 'poetry' ) { + poetry install --with doc } else { - python -m pip install .[doc] + python -m pip install .[doc] } # ------------------------------------------------------------------------ @@ -262,18 +310,10 @@ runs: message: > Build HTML, PDF and JSON documentation. - - name: Determine command context - shell: powershell - run: | - if ((Test-Path "pyproject.toml") -and (Get-Content "pyproject.toml" | Select-String -Pattern 'build-backend = "poetry\.core\.masonry\.api"')) { - echo "SPHINX_BUILD_MAKE=$(echo 'poetry run -- doc\make.bat')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - } else { - echo "SPHINX_BUILD_MAKE=$(echo 'doc\make.bat')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - } - - name: Build HTML, PDF, and JSON documentation shell: powershell run: | + .venv\Scripts\Activate.ps1 echo "Sphinx build make value is ${{ env.SPHINX_BUILD_MAKE }}" ${{ env.SPHINX_BUILD_MAKE }} html SPHINXOPTS="${{ inputs.sphinxopts }}" ${{ env.SPHINX_BUILD_MAKE }} pdf @@ -297,6 +337,7 @@ runs: if: ${{ inputs.add-pdf-html-docs-as-assets == 'true' }} shell: powershell run: | + .venv\Scripts\Activate.ps1 python ${{ github.action_path }}\..\doc-build\parse_doc_conf.py - uses: ansys/actions/_logging@main diff --git a/check-vulnerabilities/action.yml b/check-vulnerabilities/action.yml index b4a00b406..83be471c3 100644 --- a/check-vulnerabilities/action.yml +++ b/check-vulnerabilities/action.yml @@ -185,22 +185,87 @@ runs: with: repository: ${{ env.DEPENDENCY_CHECK_REPOSITORY }} + # ------------------------------------------------------------------------ + + - uses: ansys/actions/_logging@main + with: + level: "INFO" + message: > + Determine context. + + - name: "Determine Github environnement variables" + shell: bash + run: | + if [[ -f "pyproject.toml" ]] && grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then + echo "BUILD_BACKEND=$(echo 'poetry')" >> $GITHUB_ENV + else + echo "BUILD_BACKEND=$(echo 'pip')" >> $GITHUB_ENV + + - uses: ansys/actions/_logging@main + with: + level: "INFO" + message: > + Build backend: ${{ env.BUILD_BACKEND }} + + # ------------------------------------------------------------------------ + + - uses: ansys/actions/_logging@main + with: + level: "INFO" + message: > + Set up python to check vulnerabilities. + + - name: "Set poetry environment variable(s) (if required)" + shell: bash + if: env.BUILD_BACKEND == 'poetry' + run: | + # For projects using poetry, do not use a virtual environment. + # Poetry uses virtual environments to install its dependencies, but this might + # lead to problems if it is not activated prior to executing poetry commands. + # Store POETRY_VIRTUALENVS_CREATE=false in the GitHub environment to prevent + # poetry from creating a virtual environment. + # + echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENV + - name: "Set up Python ${{ inputs.python-version }}" uses: ansys/actions/_setup-python@main with: python-version: ${{ inputs.python-version }} use-cache: false + - name: Create virtual environment + shell: bash + run: | + python -m venv .venv + + - name: "Update pip" + shell: bash + run: | + source .venv/bin/activate + python -m pip install -U pip + + - name: "Install poetry (if required)" + shell: bash + if: env.BUILD_BACKEND == 'poetry' + run: | + source .venv/bin/activate + python -m pip install poetry + - name: "Install requirements" shell: bash run: | - python -m pip install --upgrade pip + source .venv/bin/activate pip install -r ${{ github.action_path }}/requirements.txt - name: "Install library" shell: bash run: | - python -m pip install . + source .venv/bin/activate + if [[ ${{ env.BUILD_BACKEND }} == 'poetry' ]]; then + poetry install + else + python -m pip install . + fi - name: "Download the list of ignored safety vulnerabilities" shell: bash @@ -210,6 +275,7 @@ runs: - name: "Run safety and bandit" shell: bash run: | + source .venv/bin/activate # Load accepted safety vulnerabilities mapfile ignored_safety_vulnerabilities < ignored-safety.txt ignored_vulnerabilities='' @@ -224,6 +290,7 @@ runs: - name: "Run safety advisory checks" shell: bash run: | + source .venv/bin/activate if [[ ${{ inputs.hide-log }} == 'true' ]]; then python ${{ github.action_path }}/check_vulnerabilities.py > /dev/null 2>&1 else diff --git a/code-style/action.yml b/code-style/action.yml index ed1f0fe52..9fee1b07e 100644 --- a/code-style/action.yml +++ b/code-style/action.yml @@ -96,31 +96,71 @@ runs: - name: "Install Git and clone project" uses: actions/checkout@v4 + # ------------------------------------------------------------------------ + + - uses: ansys/actions/_logging@main + with: + level: "INFO" + message: > + Determine context. + + - name: "Determine Github environnement variables" + shell: bash + run: | + if [[ -f "pyproject.toml" ]] && grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then + echo "BUILD_BACKEND=$(echo 'poetry')" >> $GITHUB_ENV + else + echo "BUILD_BACKEND=$(echo 'pip')" >> $GITHUB_ENV + + - uses: ansys/actions/_logging@main + with: + level: "INFO" + message: > + Build backend: ${{ env.BUILD_BACKEND }} + + # ------------------------------------------------------------------------ + + - uses: ansys/actions/_logging@main + with: + level: "INFO" + message: > + Set up python to check code style. + + - name: "Set poetry environment variable(s) (if required)" + shell: bash + if: env.BUILD_BACKEND == 'poetry' + run: | + # For projects using poetry, do not use a virtual environment. + # Poetry uses virtual environments to install its dependencies, but this might + # lead to problems if it is not activated prior to executing poetry commands. + # Store POETRY_VIRTUALENVS_CREATE=false in the GitHub environment to prevent + # poetry from creating a virtual environment. + # + echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENV + - name: "Set up Python" uses: ansys/actions/_setup-python@main with: python-version: ${{ inputs.python-version }} use-cache: ${{ inputs.use-python-cache }} - - name: "Upgrade pip and disable virtual environment (for poetry only)" + - name: Create virtual environment shell: bash run: | - python -m pip install --upgrade pip - if grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then - # For projects using poetry, do not use a virtual environment. - # Poetry uses virtual environments to install its dependencies, but this might - # lead to problems if it is not activated prior to executing poetry commands. - # Store POETRY_VIRTUALENVS_CREATE=false in the GitHub environment to prevent - # poetry from creating a virtual environment. - # - echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENV - fi + python -m venv .venv + + - name: "Update pip" + shell: bash + run: | + source .venv/bin/activate + python -m pip install -U pip - name: "Install project (if required)" if: inputs.skip-install == 'false' shell: bash run: | - if grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then + source .venv/bin/activate + if [[ ${{ env.BUILD_BACKEND }} == 'poetry' ]]; then python -m pip install poetry python -m poetry install else @@ -130,12 +170,14 @@ runs: - name: "Install pre-commit" shell: bash run: | + source .venv/bin/activate python -m pip install pre-commit pre-commit install - name: "Run pre-commit" shell: bash run: | + source .venv/bin/activate pre-commit run --all-files --show-diff-on-failure # ------------------------------------------------------------------------ diff --git a/doc-build/action.yml b/doc-build/action.yml index 68483d41e..1d36a443a 100644 --- a/doc-build/action.yml +++ b/doc-build/action.yml @@ -191,6 +191,11 @@ runs: python-version: ${{ inputs.python-version }} use-cache: ${{ inputs.use-python-cache }} + - name: Create virtual environment + shell: + run: | + python -m venv .venv + # ------------------------------------------------------------------------ - name: Documentation build (Linux) diff --git a/tests-pytest/action.yml b/tests-pytest/action.yml index 42c2b8dbe..c2917a4ea 100644 --- a/tests-pytest/action.yml +++ b/tests-pytest/action.yml @@ -101,31 +101,71 @@ runs: uses: actions/checkout@v4 if: ${{ inputs.checkout == 'true' }} + # ------------------------------------------------------------------------ + + - uses: ansys/actions/_logging@main + with: + level: "INFO" + message: > + Determine context. + + - name: "Determine Github environnement variables" + shell: bash + run: | + if [[ -f "pyproject.toml" ]] && grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then + echo "BUILD_BACKEND=$(echo 'poetry')" >> $GITHUB_ENV + else + echo "BUILD_BACKEND=$(echo 'pip')" >> $GITHUB_ENV + + - uses: ansys/actions/_logging@main + with: + level: "INFO" + message: > + Build backend: ${{ env.BUILD_BACKEND }} + + # ------------------------------------------------------------------------ + + - uses: ansys/actions/_logging@main + with: + level: "INFO" + message: > + Set up python to test. + + - name: "Set poetry environment variable(s) (if required)" + shell: bash + if: env.BUILD_BACKEND == 'poetry' + run: | + # For projects using poetry, do not use a virtual environment. + # Poetry uses virtual environments to install its dependencies, but this might + # lead to problems if it is not activated prior to executing poetry commands. + # Store POETRY_VIRTUALENVS_CREATE=false in the GitHub environment to prevent + # poetry from creating a virtual environment. + # + echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENV + - name: "Set up Python" uses: ansys/actions/_setup-python@main with: python-version: ${{ inputs.python-version }} use-cache: ${{ inputs.use-python-cache }} - - name: "Upgrade pip and disable virtual environment (for poetry only)" + - name: Create virtual environment shell: bash run: | - python -m pip install --upgrade pip - if grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then - # For projects using poetry, do not use a virtual environment. - # Poetry uses virtual environments to install its dependencies, but this might - # lead to problems if it is not activated prior to executing poetry commands. - # Store POETRY_VIRTUALENVS_CREATE=false in the GitHub environment to prevent - # poetry from creating a virtual environment. - # - echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENV - fi + python -m venv .venv + + - name: "Update pip" + shell: bash + run: | + source .venv/bin/activate + python -m pip install -U pip - name: "Install project (if required)" if: inputs.skip-install == 'false' shell: bash run: | - if grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then + source .venv/bin/activate + if [[ ${{ env.BUILD_BACKEND }} == 'poetry' ]]; then python -m pip install poetry poetry install else @@ -152,13 +192,16 @@ runs: - name: "Install test dependencies from the requirements file" shell: bash if: env.EXISTS_TESTS_REQUIREMENTS == 'true' - run: python -m pip install -r requirements/requirements_tests.txt + run: | + source .venv/bin/activate + python -m pip install -r requirements/requirements_tests.txt - name: "Install test dependencies from pyproject.toml" shell: bash if: env.EXISTS_TESTS_REQUIREMENTS == 'false' run: | - if grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then + source .venv/bin/activate + if [[ ${{ env.BUILD_BACKEND }} == 'poetry' ]]; then poetry install --with tests else python -m pip install .[tests] @@ -168,10 +211,12 @@ runs: if: inputs.requires-xvfb == 'false' shell: bash run: | + source .venv/bin/activate pytest ${{ inputs.pytest-markers }} ${{ inputs.pytest-extra-args }} ${{ inputs.pytest-postargs }} - name: "Executing test suite using xvfb" if: inputs.requires-xvfb == 'true' shell: bash run: | + source .venv/bin/activate xvfb-run pytest ${{ inputs.pytest-markers }} ${{ inputs.pytest-extra-args }} ${{ inputs.pytest-postargs }} From fb4f2614ee3068ce7f56e4e18b5c7c08836543b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morais?= <146729917+SMoraisAnsys@users.noreply.github.com> Date: Mon, 9 Sep 2024 10:02:26 +0200 Subject: [PATCH 02/19] Update _doc-build-linux/action.yml Co-authored-by: Maxime Rey <87315832+MaxJPRey@users.noreply.github.com> --- _doc-build-linux/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_doc-build-linux/action.yml b/_doc-build-linux/action.yml index a4f543923..43e67d12f 100644 --- a/_doc-build-linux/action.yml +++ b/_doc-build-linux/action.yml @@ -187,7 +187,7 @@ runs: message: > Determine context. - - name: "Determine Github environnement variables" + - name: "Determine GitHub environnement variables" shell: bash run: | if [[ -f "pyproject.toml" ]] && grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then From ab99e1d702e6e78f4ed0ed41ee8c46b02d38cbca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morais?= <146729917+SMoraisAnsys@users.noreply.github.com> Date: Mon, 9 Sep 2024 10:02:52 +0200 Subject: [PATCH 03/19] Update _doc-build-windows/action.yml --- _doc-build-windows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_doc-build-windows/action.yml b/_doc-build-windows/action.yml index 43717307f..500e41b1b 100644 --- a/_doc-build-windows/action.yml +++ b/_doc-build-windows/action.yml @@ -217,7 +217,7 @@ runs: message: > Determine context. - - name: "Determine Github environnement variables" + - name: "Determine GitHub environnement variables" shell: powershell run: | if ((Test-Path "pyproject.toml") -and (Get-Content "pyproject.toml" | Select-String -Pattern 'build-backend = "poetry\.core\.masonry\.api"')) { From 058dc1062c405af83181b81a66a5cbd7ce7657ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morais?= <146729917+SMoraisAnsys@users.noreply.github.com> Date: Mon, 9 Sep 2024 10:06:30 +0200 Subject: [PATCH 04/19] Apply suggestions from code review --- _doc-build-linux/action.yml | 2 +- _doc-build-windows/action.yml | 2 +- check-vulnerabilities/action.yml | 3 ++- code-style/action.yml | 2 +- tests-pytest/action.yml | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/_doc-build-linux/action.yml b/_doc-build-linux/action.yml index 43e67d12f..7eb7a21d4 100644 --- a/_doc-build-linux/action.yml +++ b/_doc-build-linux/action.yml @@ -187,7 +187,7 @@ runs: message: > Determine context. - - name: "Determine GitHub environnement variables" + - name: "Determine GitHub environment variables" shell: bash run: | if [[ -f "pyproject.toml" ]] && grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then diff --git a/_doc-build-windows/action.yml b/_doc-build-windows/action.yml index 500e41b1b..80361510f 100644 --- a/_doc-build-windows/action.yml +++ b/_doc-build-windows/action.yml @@ -217,7 +217,7 @@ runs: message: > Determine context. - - name: "Determine GitHub environnement variables" + - name: "Determine GitHub environment variables" shell: powershell run: | if ((Test-Path "pyproject.toml") -and (Get-Content "pyproject.toml" | Select-String -Pattern 'build-backend = "poetry\.core\.masonry\.api"')) { diff --git a/check-vulnerabilities/action.yml b/check-vulnerabilities/action.yml index 83be471c3..d64b64b4a 100644 --- a/check-vulnerabilities/action.yml +++ b/check-vulnerabilities/action.yml @@ -193,7 +193,8 @@ runs: message: > Determine context. - - name: "Determine Github environnement variables" + - name: "Determine GitHub environment variables" + shell: bash run: | if [[ -f "pyproject.toml" ]] && grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then diff --git a/code-style/action.yml b/code-style/action.yml index 9fee1b07e..2ccf6d0b0 100644 --- a/code-style/action.yml +++ b/code-style/action.yml @@ -104,7 +104,7 @@ runs: message: > Determine context. - - name: "Determine Github environnement variables" + - name: "Determine GitHub environment variables" shell: bash run: | if [[ -f "pyproject.toml" ]] && grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then diff --git a/tests-pytest/action.yml b/tests-pytest/action.yml index c2917a4ea..e93e199c6 100644 --- a/tests-pytest/action.yml +++ b/tests-pytest/action.yml @@ -109,7 +109,7 @@ runs: message: > Determine context. - - name: "Determine Github environnement variables" + - name: "Determine GitHub environment variables" shell: bash run: | if [[ -f "pyproject.toml" ]] && grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then From e941793a24a68a51db110bba0dfe8cb906309c7e Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Mon, 9 Sep 2024 10:08:46 +0200 Subject: [PATCH 05/19] fix: remove unused env variable --- _doc-build-linux/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_doc-build-linux/action.yml b/_doc-build-linux/action.yml index 7eb7a21d4..68d1ec6b0 100644 --- a/_doc-build-linux/action.yml +++ b/_doc-build-linux/action.yml @@ -268,7 +268,7 @@ runs: if [[ ${{ env.BUILD_BACKEND }} == 'poetry' ]]; then poetry install --with doc else - python -m pip install .[doc] ${{ env.PYTHON_NO_CACHE_OPTION }} + python -m pip install .[doc] fi # ------------------------------------------------------------------------ From 832672d969da36d4f1be06332ed147139b8a3b93 Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Mon, 9 Sep 2024 18:22:45 +0200 Subject: [PATCH 06/19] fix: missing fi statement --- _doc-build-windows/action.yml | 4 ++-- check-vulnerabilities/action.yml | 1 + code-style/action.yml | 1 + tests-pytest/action.yml | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/_doc-build-windows/action.yml b/_doc-build-windows/action.yml index 80361510f..170f09a02 100644 --- a/_doc-build-windows/action.yml +++ b/_doc-build-windows/action.yml @@ -222,10 +222,10 @@ runs: run: | if ((Test-Path "pyproject.toml") -and (Get-Content "pyproject.toml" | Select-String -Pattern 'build-backend = "poetry\.core\.masonry\.api"')) { echo "BUILD_BACKEND=$(echo 'poetry')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - echo "SPHINX_BUILD_MAKE=$(echo 'poetry run -- doc\make.bat')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "SPHINX_BUILD_MAKE=$(echo 'poetry run -- make.bat')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append } else { echo "BUILD_BACKEND=$(echo 'pip')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - echo "SPHINX_BUILD_MAKE=$(echo 'doc\make.bat')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "SPHINX_BUILD_MAKE=$(echo 'make.bat')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append } - uses: ansys/actions/_logging@main diff --git a/check-vulnerabilities/action.yml b/check-vulnerabilities/action.yml index d64b64b4a..0d63bc796 100644 --- a/check-vulnerabilities/action.yml +++ b/check-vulnerabilities/action.yml @@ -201,6 +201,7 @@ runs: echo "BUILD_BACKEND=$(echo 'poetry')" >> $GITHUB_ENV else echo "BUILD_BACKEND=$(echo 'pip')" >> $GITHUB_ENV + fi - uses: ansys/actions/_logging@main with: diff --git a/code-style/action.yml b/code-style/action.yml index 2ccf6d0b0..41afc6e7c 100644 --- a/code-style/action.yml +++ b/code-style/action.yml @@ -111,6 +111,7 @@ runs: echo "BUILD_BACKEND=$(echo 'poetry')" >> $GITHUB_ENV else echo "BUILD_BACKEND=$(echo 'pip')" >> $GITHUB_ENV + fi - uses: ansys/actions/_logging@main with: diff --git a/tests-pytest/action.yml b/tests-pytest/action.yml index e93e199c6..f6a3d37bc 100644 --- a/tests-pytest/action.yml +++ b/tests-pytest/action.yml @@ -116,6 +116,7 @@ runs: echo "BUILD_BACKEND=$(echo 'poetry')" >> $GITHUB_ENV else echo "BUILD_BACKEND=$(echo 'pip')" >> $GITHUB_ENV + fi - uses: ansys/actions/_logging@main with: From 666b8ef374d97bd681e206cddd1c7099f968d23f Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Tue, 10 Sep 2024 15:26:24 +0200 Subject: [PATCH 07/19] tbr: using correct private action for testing --- doc-build/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc-build/action.yml b/doc-build/action.yml index 1d36a443a..cf82df832 100644 --- a/doc-build/action.yml +++ b/doc-build/action.yml @@ -200,7 +200,7 @@ runs: - name: Documentation build (Linux) if: ${{ runner.os == 'Linux' }} - uses: ansys/actions/_doc-build-linux@main + uses: ansys/actions/_doc-build-linux@fix/inconsistent-behavior with: sphinxopts: ${{ inputs.sphinxopts }} dependencies: ${{ inputs.dependencies }} @@ -225,7 +225,7 @@ runs: - name: Documentation build (Windows) if: ${{ runner.os == 'Windows' }} - uses: ansys/actions/_doc-build-windows@main + uses: ansys/actions/_doc-build-windows@fix/inconsistent-behavior with: sphinxopts: ${{ inputs.sphinxopts }} dependencies: ${{ inputs.dependencies }} From 1cd00df4a6f0f6282c99450b0e97845e25a500b0 Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Tue, 10 Sep 2024 15:55:35 +0200 Subject: [PATCH 08/19] fix: add forgotten fi --- _doc-build-linux/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/_doc-build-linux/action.yml b/_doc-build-linux/action.yml index 68d1ec6b0..06902d0aa 100644 --- a/_doc-build-linux/action.yml +++ b/_doc-build-linux/action.yml @@ -196,6 +196,7 @@ runs: else echo "BUILD_BACKEND=$(echo 'pip')" >> $GITHUB_ENV echo "SPHINX_BUILD_MAKE=$(echo 'make')" >> $GITHUB_ENV + fi - uses: ansys/actions/_logging@main with: From 077ca07b06b8875eaa3bd0d7a37b554b2f721cfd Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Tue, 10 Sep 2024 16:04:00 +0200 Subject: [PATCH 09/19] fix: shell value in windows --- _doc-build-windows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_doc-build-windows/action.yml b/_doc-build-windows/action.yml index 170f09a02..b13b2b250 100644 --- a/_doc-build-windows/action.yml +++ b/_doc-build-windows/action.yml @@ -274,7 +274,7 @@ runs: python -m pip install -r ${{ inputs.requirements-file }} - name: "Install poetry (if required)" - shell: bash + shell: powershell if: env.BUILD_BACKEND == 'poetry' run: | .venv\Scripts\Activate.ps1 From 450dd7353a99bd2b96311bc5d404ddf29a94e2ef Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Tue, 10 Sep 2024 17:38:03 +0200 Subject: [PATCH 10/19] fix: wrong env reference --- _doc-build-linux/action.yml | 2 +- _doc-build-windows/action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_doc-build-linux/action.yml b/_doc-build-linux/action.yml index 06902d0aa..5e74c7fca 100644 --- a/_doc-build-linux/action.yml +++ b/_doc-build-linux/action.yml @@ -203,7 +203,7 @@ runs: level: "INFO" message: > Build backend: ${{ env.BUILD_BACKEND }} - Sphinx build make: ${{ SPHINX_BUILD_MAKE }} + Sphinx build make: ${{ env.SPHINX_BUILD_MAKE }} # ------------------------------------------------------------------------ diff --git a/_doc-build-windows/action.yml b/_doc-build-windows/action.yml index b13b2b250..ce10a1b53 100644 --- a/_doc-build-windows/action.yml +++ b/_doc-build-windows/action.yml @@ -233,7 +233,7 @@ runs: level: "INFO" message: > Build backend: ${{ env.BUILD_BACKEND }} - Sphinx build make: ${{ SPHINX_BUILD_MAKE }} + Sphinx build make: ${{ env.SPHINX_BUILD_MAKE }} # ------------------------------------------------------------------------ From cd422dd922b844d128761f0995b67cecb3e5f609 Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Thu, 12 Sep 2024 11:31:46 +0200 Subject: [PATCH 11/19] fix: add step to move to doc folder --- _doc-build-linux/action.yml | 29 +++++++++++++++++------------ _doc-build-windows/action.yml | 20 ++++++++++++-------- 2 files changed, 29 insertions(+), 20 deletions(-) diff --git a/_doc-build-linux/action.yml b/_doc-build-linux/action.yml index 5e74c7fca..096bd7b43 100644 --- a/_doc-build-linux/action.yml +++ b/_doc-build-linux/action.yml @@ -272,6 +272,11 @@ runs: python -m pip install .[doc] fi + - name: "Move into doc foled" + shell: bash + run: | + cd doc + # ------------------------------------------------------------------------ - uses: ansys/actions/_logging@main @@ -285,15 +290,15 @@ runs: shell: bash run: | source .venv/bin/activate - ${{ env.SPHINX_BUILD_MAKE }} -C doc html SPHINXOPTS="${{ inputs.sphinxopts }}" - ${{ env.SPHINX_BUILD_MAKE }} -C doc pdf + ${{ env.SPHINX_BUILD_MAKE }} html SPHINXOPTS="${{ inputs.sphinxopts }}" + ${{ env.SPHINX_BUILD_MAKE }} pdf if [[ ${{ inputs.check-links }} == 'true' ]]; then - ${{ env.SPHINX_BUILD_MAKE }} -C doc linkcheck SPHINXOPTS="${{ inputs.sphinxopts }}" + ${{ env.SPHINX_BUILD_MAKE }} linkcheck SPHINXOPTS="${{ inputs.sphinxopts }}" fi if [[ ${{ inputs.skip-json-build }} == 'false' ]]; then - ${{ env.SPHINX_BUILD_MAKE }} -C doc json SPHINXOPTS="${{ inputs.sphinxopts }}" + ${{ env.SPHINX_BUILD_MAKE }} json SPHINXOPTS="${{ inputs.sphinxopts }}" fi - name: "Build HTML, PDF, and JSON documentation using xvfb" @@ -301,15 +306,15 @@ runs: shell: bash run: | source .venv/bin/activate - xvfb-run ${{ env.SPHINX_BUILD_MAKE }} -C doc html SPHINXOPTS="${{ inputs.sphinxopts }}" - xvfb-run ${{ env.SPHINX_BUILD_MAKE }} -C doc pdf + xvfb-run ${{ env.SPHINX_BUILD_MAKE }} html SPHINXOPTS="${{ inputs.sphinxopts }}" + xvfb-run ${{ env.SPHINX_BUILD_MAKE }} pdf if [[ ${{ inputs.check-links }} == 'true' ]]; then - xvfb-run ${{ env.SPHINX_BUILD_MAKE }} -C doc linkcheck SPHINXOPTS="${{ inputs.sphinxopts }}" + xvfb-run ${{ env.SPHINX_BUILD_MAKE }} linkcheck SPHINXOPTS="${{ inputs.sphinxopts }}" fi if [[ ${{ inputs.skip-json-build }} == 'false' ]]; then - xvfb-run ${{ env.SPHINX_BUILD_MAKE }} -C doc json SPHINXOPTS="${{ inputs.sphinxopts }}" + xvfb-run ${{ env.SPHINX_BUILD_MAKE }} json SPHINXOPTS="${{ inputs.sphinxopts }}" fi # ------------------------------------------------------------------------ @@ -355,7 +360,7 @@ runs: if: ${{ inputs.add-pdf-html-docs-as-assets == 'true' }} shell: bash run: | - echo "EXPECTED_BUILD_DIR=doc/_build" >> $GITHUB_ENV + echo "EXPECTED_BUILD_DIR=_build" >> $GITHUB_ENV - name: Check expected build directory if: ${{ inputs.add-pdf-html-docs-as-assets == 'true' }} @@ -431,14 +436,14 @@ runs: uses: actions/upload-artifact@v4 with: name: documentation-html - path: doc/_build/html + path: _build/html retention-days: 7 - name: "Upload PDF documentation artifact" uses: actions/upload-artifact@v4 with: name: documentation-pdf - path: doc/_build/latex/*.pdf + path: _build/latex/*.pdf retention-days: 7 - name: "Upload JSON documentation artifact" @@ -446,5 +451,5 @@ runs: if: inputs.skip-json-build == 'false' with: name: documentation-json - path: doc/_build/json + path: _build/json retention-days: 7 diff --git a/_doc-build-windows/action.yml b/_doc-build-windows/action.yml index ce10a1b53..7bf22e649 100644 --- a/_doc-build-windows/action.yml +++ b/_doc-build-windows/action.yml @@ -33,8 +33,8 @@ description: | `_ is available after installing the documentation dependencies, the action uses it to generate documentation from the source. It requires that all the - documentation is contained in the ``doc/`` directory of a project. The - action locates the ``doc/make.bat`` and runs the ``make.bat html`` and + documentation is contained in the ``doc\`` directory of a project. The + action locates the ``doc\make.bat`` and runs the ``make.bat html`` and ``make.bat pdf`` commands. If desired, the ``make.bat json`` command can also be executed to generate JSON documentation. @@ -100,7 +100,7 @@ inputs: Whether to add PDF and HTML documentation as assets of the HTML documentation. The HTML documentation is compressed before being added. The PDF file name is expected to be retrieved through the documentation's - configuration file 'conf.py' in 'doc/source'. + configuration file 'conf.py' in 'doc\source'. .. warning:: @@ -302,6 +302,11 @@ runs: python -m pip install .[doc] } + - name: "Move into doc directory" + shell: powershell + run: | + cd doc + # ------------------------------------------------------------------------ - uses: ansys/actions/_logging@main @@ -314,7 +319,6 @@ runs: shell: powershell run: | .venv\Scripts\Activate.ps1 - echo "Sphinx build make value is ${{ env.SPHINX_BUILD_MAKE }}" ${{ env.SPHINX_BUILD_MAKE }} html SPHINXOPTS="${{ inputs.sphinxopts }}" ${{ env.SPHINX_BUILD_MAKE }} pdf if ("${{ inputs.check-links }}" -eq 'true' ) { @@ -367,7 +371,7 @@ runs: if: ${{ inputs.add-pdf-html-docs-as-assets == 'true' }} shell: powershell run: | - echo "EXPECTED_BUILD_DIR=$(echo 'doc\_build')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "EXPECTED_BUILD_DIR=$(echo '_build')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Check expected build directory if: ${{ inputs.add-pdf-html-docs-as-assets == 'true' }} @@ -443,14 +447,14 @@ runs: uses: actions/upload-artifact@v4 with: name: documentation-html - path: doc/_build/html + path: _build/html retention-days: 7 - name: Upload PDF documentation artifact uses: actions/upload-artifact@v4 with: name: documentation-pdf - path: doc/_build/latex/*.pdf + path: _build/latex/*.pdf retention-days: 7 - name: Upload JSON documentation artifact @@ -458,5 +462,5 @@ runs: if: inputs.skip-json-build == 'false' with: name: documentation-json - path: doc/_build/json + path: _build/json retention-days: 7 From 521736df9964ea0b588a11c674ec401ea575948f Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Thu, 19 Sep 2024 10:13:38 +0200 Subject: [PATCH 12/19] fix: call to make.bat executable --- _doc-build-windows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_doc-build-windows/action.yml b/_doc-build-windows/action.yml index 7bf22e649..a4b5b0aac 100644 --- a/_doc-build-windows/action.yml +++ b/_doc-build-windows/action.yml @@ -225,7 +225,7 @@ runs: echo "SPHINX_BUILD_MAKE=$(echo 'poetry run -- make.bat')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append } else { echo "BUILD_BACKEND=$(echo 'pip')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - echo "SPHINX_BUILD_MAKE=$(echo 'make.bat')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "SPHINX_BUILD_MAKE=$(echo '.\make.bat')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append } - uses: ansys/actions/_logging@main From 05460c1986cdf00a63ab8cee5b39cae8af1fd0dc Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Thu, 19 Sep 2024 10:55:43 +0200 Subject: [PATCH 13/19] fix: doc directory handling --- _doc-build-linux/action.yml | 30 +++++++++++++----------------- _doc-build-windows/action.yml | 14 +++++--------- 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/_doc-build-linux/action.yml b/_doc-build-linux/action.yml index 096bd7b43..9cc177684 100644 --- a/_doc-build-linux/action.yml +++ b/_doc-build-linux/action.yml @@ -272,11 +272,6 @@ runs: python -m pip install .[doc] fi - - name: "Move into doc foled" - shell: bash - run: | - cd doc - # ------------------------------------------------------------------------ - uses: ansys/actions/_logging@main @@ -290,15 +285,15 @@ runs: shell: bash run: | source .venv/bin/activate - ${{ env.SPHINX_BUILD_MAKE }} html SPHINXOPTS="${{ inputs.sphinxopts }}" - ${{ env.SPHINX_BUILD_MAKE }} pdf + ${{ env.SPHINX_BUILD_MAKE }} -C doc html SPHINXOPTS="${{ inputs.sphinxopts }}" + ${{ env.SPHINX_BUILD_MAKE }} -C doc pdf if [[ ${{ inputs.check-links }} == 'true' ]]; then - ${{ env.SPHINX_BUILD_MAKE }} linkcheck SPHINXOPTS="${{ inputs.sphinxopts }}" + ${{ env.SPHINX_BUILD_MAKE }} -C doc linkcheck SPHINXOPTS="${{ inputs.sphinxopts }}" fi if [[ ${{ inputs.skip-json-build }} == 'false' ]]; then - ${{ env.SPHINX_BUILD_MAKE }} json SPHINXOPTS="${{ inputs.sphinxopts }}" + ${{ env.SPHINX_BUILD_MAKE }} -C doc json SPHINXOPTS="${{ inputs.sphinxopts }}" fi - name: "Build HTML, PDF, and JSON documentation using xvfb" @@ -306,15 +301,16 @@ runs: shell: bash run: | source .venv/bin/activate - xvfb-run ${{ env.SPHINX_BUILD_MAKE }} html SPHINXOPTS="${{ inputs.sphinxopts }}" - xvfb-run ${{ env.SPHINX_BUILD_MAKE }} pdf + cd doc + xvfb-run ${{ env.SPHINX_BUILD_MAKE }} -C doc html SPHINXOPTS="${{ inputs.sphinxopts }}" + xvfb-run ${{ env.SPHINX_BUILD_MAKE }} -C doc pdf if [[ ${{ inputs.check-links }} == 'true' ]]; then - xvfb-run ${{ env.SPHINX_BUILD_MAKE }} linkcheck SPHINXOPTS="${{ inputs.sphinxopts }}" + xvfb-run ${{ env.SPHINX_BUILD_MAKE }} -C doc linkcheck SPHINXOPTS="${{ inputs.sphinxopts }}" fi if [[ ${{ inputs.skip-json-build }} == 'false' ]]; then - xvfb-run ${{ env.SPHINX_BUILD_MAKE }} json SPHINXOPTS="${{ inputs.sphinxopts }}" + xvfb-run ${{ env.SPHINX_BUILD_MAKE }} -C doc json SPHINXOPTS="${{ inputs.sphinxopts }}" fi # ------------------------------------------------------------------------ @@ -360,7 +356,7 @@ runs: if: ${{ inputs.add-pdf-html-docs-as-assets == 'true' }} shell: bash run: | - echo "EXPECTED_BUILD_DIR=_build" >> $GITHUB_ENV + echo "EXPECTED_BUILD_DIR=doc/_build" >> $GITHUB_ENV - name: Check expected build directory if: ${{ inputs.add-pdf-html-docs-as-assets == 'true' }} @@ -436,14 +432,14 @@ runs: uses: actions/upload-artifact@v4 with: name: documentation-html - path: _build/html + path: doc/_build/html retention-days: 7 - name: "Upload PDF documentation artifact" uses: actions/upload-artifact@v4 with: name: documentation-pdf - path: _build/latex/*.pdf + path: doc/_build/latex/*.pdf retention-days: 7 - name: "Upload JSON documentation artifact" @@ -451,5 +447,5 @@ runs: if: inputs.skip-json-build == 'false' with: name: documentation-json - path: _build/json + path: doc/_build/json retention-days: 7 diff --git a/_doc-build-windows/action.yml b/_doc-build-windows/action.yml index a4b5b0aac..58753db0d 100644 --- a/_doc-build-windows/action.yml +++ b/_doc-build-windows/action.yml @@ -302,11 +302,6 @@ runs: python -m pip install .[doc] } - - name: "Move into doc directory" - shell: powershell - run: | - cd doc - # ------------------------------------------------------------------------ - uses: ansys/actions/_logging@main @@ -319,6 +314,7 @@ runs: shell: powershell run: | .venv\Scripts\Activate.ps1 + cd doc ${{ env.SPHINX_BUILD_MAKE }} html SPHINXOPTS="${{ inputs.sphinxopts }}" ${{ env.SPHINX_BUILD_MAKE }} pdf if ("${{ inputs.check-links }}" -eq 'true' ) { @@ -371,7 +367,7 @@ runs: if: ${{ inputs.add-pdf-html-docs-as-assets == 'true' }} shell: powershell run: | - echo "EXPECTED_BUILD_DIR=$(echo '_build')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "EXPECTED_BUILD_DIR=$(echo 'doc\_build')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Check expected build directory if: ${{ inputs.add-pdf-html-docs-as-assets == 'true' }} @@ -447,14 +443,14 @@ runs: uses: actions/upload-artifact@v4 with: name: documentation-html - path: _build/html + path: doc/_build/html retention-days: 7 - name: Upload PDF documentation artifact uses: actions/upload-artifact@v4 with: name: documentation-pdf - path: _build/latex/*.pdf + path: doc/_build/latex/*.pdf retention-days: 7 - name: Upload JSON documentation artifact @@ -462,5 +458,5 @@ runs: if: inputs.skip-json-build == 'false' with: name: documentation-json - path: _build/json + path: doc/_build/json retention-days: 7 From 2c74b8e192088e13d0a2be8f9f5e14978499d08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morais?= <146729917+SMoraisAnsys@users.noreply.github.com> Date: Thu, 19 Sep 2024 13:53:46 +0200 Subject: [PATCH 14/19] fix: revert use of main in private action --- _doc-build-windows/action.yml | 2 +- doc-build/action.yml | 4 ++-- tests-pytest/action.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_doc-build-windows/action.yml b/_doc-build-windows/action.yml index 58753db0d..589f3de6a 100644 --- a/_doc-build-windows/action.yml +++ b/_doc-build-windows/action.yml @@ -261,7 +261,7 @@ runs: .venv\Scripts\Activate.ps1 python -m pip install -U pip - - name: Check if requirements.txt file exists + - name: "Check if requirements.txt file exists" shell: powershell run: | echo "EXISTS_DOC_REQUIREMENTS=$(if (Test-Path '${{ inputs.requirements-file }}') { echo 'true' } else { echo 'false' })" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 diff --git a/doc-build/action.yml b/doc-build/action.yml index cf82df832..1d36a443a 100644 --- a/doc-build/action.yml +++ b/doc-build/action.yml @@ -200,7 +200,7 @@ runs: - name: Documentation build (Linux) if: ${{ runner.os == 'Linux' }} - uses: ansys/actions/_doc-build-linux@fix/inconsistent-behavior + uses: ansys/actions/_doc-build-linux@main with: sphinxopts: ${{ inputs.sphinxopts }} dependencies: ${{ inputs.dependencies }} @@ -225,7 +225,7 @@ runs: - name: Documentation build (Windows) if: ${{ runner.os == 'Windows' }} - uses: ansys/actions/_doc-build-windows@fix/inconsistent-behavior + uses: ansys/actions/_doc-build-windows@main with: sphinxopts: ${{ inputs.sphinxopts }} dependencies: ${{ inputs.dependencies }} diff --git a/tests-pytest/action.yml b/tests-pytest/action.yml index f6a3d37bc..4e9180272 100644 --- a/tests-pytest/action.yml +++ b/tests-pytest/action.yml @@ -150,7 +150,7 @@ runs: python-version: ${{ inputs.python-version }} use-cache: ${{ inputs.use-python-cache }} - - name: Create virtual environment + - name: "Create virtual environment" shell: bash run: | python -m venv .venv From 9173d3517395f3eced2dbe09c596baaad92d3b0d Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Mon, 23 Sep 2024 16:03:36 +0200 Subject: [PATCH 15/19] refactor: install poetry with pipx --- _doc-build-linux/action.yml | 52 +++++++++++++++++++++--------- _doc-build-windows/action.yml | 51 ++++++++++++++++++++--------- check-vulnerabilities/action.yml | 55 +++++++++++++++++++++----------- code-style/action.yml | 50 +++++++++++++++++++++-------- doc-build/action.yml | 5 --- tests-pytest/action.yml | 50 +++++++++++++++++++++-------- 6 files changed, 183 insertions(+), 80 deletions(-) diff --git a/_doc-build-linux/action.yml b/_doc-build-linux/action.yml index 0bb284a8c..e4cd0ca2e 100644 --- a/_doc-build-linux/action.yml +++ b/_doc-build-linux/action.yml @@ -219,17 +219,46 @@ runs: message: > Set up python to build the documentation. - - name: "Set poetry environment variable(s) (if required)" + # NOTE: Installation of poetry in a separate environment to the project to + # avoid situations in which both poetry and the project have shared + # dependencies with different version. This can lead to CICD failures. For + # more information, see https://github.com/ansys/actions/pull/560 + - name: "Add pipx/bin directory to Github Path" + if: env.BUILD_BACKEND == 'poetry' + shell: bash + run: echo "${{ runner.temp }}/pipx/bin" >> $GITHUB_PATH + + # NOTE: Poetry uses virtual environments when installing a project. As we + # want to control that creation, we store POETRY_VIRTUALENVS_CREATE=false + # in the GitHub environment. + - name: "Set poetry environment variable(s)" + if: env.BUILD_BACKEND == 'poetry' shell: bash + run: echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENVs + + # NOTE: Install pipx in a location that can be used in following CICD jobs + # but ensure that poetry is installed in a temporary folder cleaned before + # and after each job. This way poetry is kinda "installed at system level" + # making it available in the following call and installed in a different + # environment from the project. + - name: "Install poetry and create a virtual environment" if: env.BUILD_BACKEND == 'poetry' + shell: bash + run: | + python -m pip install pipx + python -m pipx install poetry + python -m venv .venv + env: + PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin + PIPX_HOME : ${{ runner.temp }}/pipx/home + + - name: "Create a virtual environment" + if: env.BUILD_BACKEND == 'pip' + shell: bash run: | - # For projects using poetry, do not use a virtual environment. - # Poetry uses virtual environments to install its dependencies, but this might - # lead to problems if it is not activated prior to executing poetry commands. - # Store POETRY_VIRTUALENVS_CREATE=false in the GitHub environment to prevent - # poetry from creating a virtual environment. - # - echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENV + python -m venv .venv + + # ------------------------------------------------------------------------ - name: "Update pip" shell: bash @@ -249,13 +278,6 @@ runs: source .venv/bin/activate python -m pip install -r ${{ inputs.requirements-file }} - - name: "Install poetry (if required)" - shell: bash - if: env.BUILD_BACKEND == 'poetry' - run: | - source .venv/bin/activate - python -m pip install poetry - - name: "Install Python library" shell: bash if: inputs.skip-install == 'false' diff --git a/_doc-build-windows/action.yml b/_doc-build-windows/action.yml index 8a0dabf2f..5f520ef07 100644 --- a/_doc-build-windows/action.yml +++ b/_doc-build-windows/action.yml @@ -244,17 +244,45 @@ runs: message: > Set up python to build the documentation. - - name: "Set poetry environment variable(s) (if required)" + # NOTE: Installation of poetry in a separate environment to the project to + # avoid situations in which both poetry and the project have shared + # dependencies with different version. This can lead to CICD failures. For + # more information, see https://github.com/ansys/actions/pull/560 + - name: "Add pipx/bin directory to Github Path" + if: env.BUILD_BACKEND == 'poetry' + shell: powershell + run: echo "${{ runner.temp }}/pipx/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + + # NOTE: Poetry uses virtual environments when installing a project. As we + # want to control that creation, we store POETRY_VIRTUALENVS_CREATE=false + # in the GitHub environment. + - name: "Set poetry environment variable(s)" + if: env.BUILD_BACKEND == 'poetry' shell: powershell + run: echo "POETRY_VIRTUALENVS_CREATE=$(echo false)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + + # NOTE: Install pipx in a location that can be used in following CICD jobs + # but ensure that poetry is installed in a temporary folder cleaned before + # and after each job. This way poetry is kinda "installed at system level" + # making it available in the following call and installed in a different + # environment from the project. + - name: "Install poetry and create a virtual environment" if: env.BUILD_BACKEND == 'poetry' + shell: powershell run: | - # For projects using poetry, do not use a virtual environment. - # Poetry uses virtual environments to install its dependencies, but this might - # lead to problems if it is not activated prior to executing poetry commands. - # Store POETRY_VIRTUALENVS_CREATE=false in the GitHub environment to prevent - # poetry from creating a virtual environment. - # - echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENV + python -m pip install pipx + python -m pipx install poetry + python -m venv .venv + env: + PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin + PIPX_HOME : ${{ runner.temp }}/pipx/home + + - name: "Create a virtual environment" + if: env.BUILD_BACKEND == 'pip' + shell: powershell + run: python -m venv .venv + + # ------------------------------------------------------------------------ - name: "Update pip" shell: powershell @@ -274,13 +302,6 @@ runs: .venv\Scripts\Activate.ps1 python -m pip install -r ${{ inputs.requirements-file }} - - name: "Install poetry (if required)" - shell: powershell - if: env.BUILD_BACKEND == 'poetry' - run: | - .venv\Scripts\Activate.ps1 - python -m pip install poetry - - name: Install Python library shell: powershell if: ${{ inputs.skip-install == 'false' }} diff --git a/check-vulnerabilities/action.yml b/check-vulnerabilities/action.yml index 0d63bc796..16c7a57c3 100644 --- a/check-vulnerabilities/action.yml +++ b/check-vulnerabilities/action.yml @@ -217,41 +217,58 @@ runs: message: > Set up python to check vulnerabilities. - - name: "Set poetry environment variable(s) (if required)" - shell: bash - if: env.BUILD_BACKEND == 'poetry' - run: | - # For projects using poetry, do not use a virtual environment. - # Poetry uses virtual environments to install its dependencies, but this might - # lead to problems if it is not activated prior to executing poetry commands. - # Store POETRY_VIRTUALENVS_CREATE=false in the GitHub environment to prevent - # poetry from creating a virtual environment. - # - echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENV - - name: "Set up Python ${{ inputs.python-version }}" uses: ansys/actions/_setup-python@main with: python-version: ${{ inputs.python-version }} use-cache: false - - name: Create virtual environment + # NOTE: Installation of poetry in a separate environment to the project to + # avoid situations in which both poetry and the project have shared + # dependencies with different version. This can lead to CICD failures. For + # more information, see https://github.com/ansys/actions/pull/560 + - name: "Add pipx/bin directory to Github Path" + if: env.BUILD_BACKEND == 'poetry' + shell: bash + run: echo "${{ runner.temp }}/pipx/bin" >> $GITHUB_PATH + + # NOTE: Poetry uses virtual environments when installing a project. As we + # want to control that creation, we store POETRY_VIRTUALENVS_CREATE=false + # in the GitHub environment. + - name: "Set poetry environment variable(s)" + if: env.BUILD_BACKEND == 'poetry' + shell: bash + run: echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENVs + + # NOTE: Install pipx in a location that can be used in following CICD jobs + # but ensure that poetry is installed in a temporary folder cleaned before + # and after each job. This way poetry is kinda "installed at system level" + # making it available in the following call and installed in a different + # environment from the project. + - name: "Install poetry and create a virtual environment" + if: env.BUILD_BACKEND == 'poetry' shell: bash run: | + python -m pip install pipx + python -m pipx install poetry python -m venv .venv + env: + PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin + PIPX_HOME : ${{ runner.temp }}/pipx/home - - name: "Update pip" + - name: "Create a virtual environment" + if: env.BUILD_BACKEND == 'pip' shell: bash run: | - source .venv/bin/activate - python -m pip install -U pip + python -m venv .venv - - name: "Install poetry (if required)" + # ------------------------------------------------------------------------ + + - name: "Update pip" shell: bash - if: env.BUILD_BACKEND == 'poetry' run: | source .venv/bin/activate - python -m pip install poetry + python -m pip install -U pip - name: "Install requirements" shell: bash diff --git a/code-style/action.yml b/code-style/action.yml index 41afc6e7c..b7440befe 100644 --- a/code-style/action.yml +++ b/code-style/action.yml @@ -127,29 +127,53 @@ runs: message: > Set up python to check code style. - - name: "Set poetry environment variable(s) (if required)" - shell: bash - if: env.BUILD_BACKEND == 'poetry' - run: | - # For projects using poetry, do not use a virtual environment. - # Poetry uses virtual environments to install its dependencies, but this might - # lead to problems if it is not activated prior to executing poetry commands. - # Store POETRY_VIRTUALENVS_CREATE=false in the GitHub environment to prevent - # poetry from creating a virtual environment. - # - echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENV - - name: "Set up Python" uses: ansys/actions/_setup-python@main with: python-version: ${{ inputs.python-version }} use-cache: ${{ inputs.use-python-cache }} - - name: Create virtual environment + # NOTE: Installation of poetry in a separate environment to the project to + # avoid situations in which both poetry and the project have shared + # dependencies with different version. This can lead to CICD failures. For + # more information, see https://github.com/ansys/actions/pull/560 + - name: "Add pipx/bin directory to Github Path" + if: env.BUILD_BACKEND == 'poetry' + shell: bash + run: echo "${{ runner.temp }}/pipx/bin" >> $GITHUB_PATH + + # NOTE: Poetry uses virtual environments when installing a project. As we + # want to control that creation, we store POETRY_VIRTUALENVS_CREATE=false + # in the GitHub environment. + - name: "Set poetry environment variable(s)" + if: env.BUILD_BACKEND == 'poetry' + shell: bash + run: echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENVs + + # NOTE: Install pipx in a location that can be used in following CICD jobs + # but ensure that poetry is installed in a temporary folder cleaned before + # and after each job. This way poetry is kinda "installed at system level" + # making it available in the following call and installed in a different + # environment from the project. + - name: "Install poetry and create a virtual environment" + if: env.BUILD_BACKEND == 'poetry' + shell: bash + run: | + python -m pip install pipx + python -m pipx install poetry + python -m venv .venv + env: + PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin + PIPX_HOME : ${{ runner.temp }}/pipx/home + + - name: "Create a virtual environment" + if: env.BUILD_BACKEND == 'pip' shell: bash run: | python -m venv .venv + # ------------------------------------------------------------------------ + - name: "Update pip" shell: bash run: | diff --git a/doc-build/action.yml b/doc-build/action.yml index f7c6f1f33..6a6ad82f6 100644 --- a/doc-build/action.yml +++ b/doc-build/action.yml @@ -197,11 +197,6 @@ runs: python-version: ${{ inputs.python-version }} use-cache: ${{ inputs.use-python-cache }} - - name: Create virtual environment - shell: - run: | - python -m venv .venv - # ------------------------------------------------------------------------ - name: Documentation build (Linux) diff --git a/tests-pytest/action.yml b/tests-pytest/action.yml index 4e9180272..c47cb0511 100644 --- a/tests-pytest/action.yml +++ b/tests-pytest/action.yml @@ -132,29 +132,53 @@ runs: message: > Set up python to test. - - name: "Set poetry environment variable(s) (if required)" - shell: bash - if: env.BUILD_BACKEND == 'poetry' - run: | - # For projects using poetry, do not use a virtual environment. - # Poetry uses virtual environments to install its dependencies, but this might - # lead to problems if it is not activated prior to executing poetry commands. - # Store POETRY_VIRTUALENVS_CREATE=false in the GitHub environment to prevent - # poetry from creating a virtual environment. - # - echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENV - - name: "Set up Python" uses: ansys/actions/_setup-python@main with: python-version: ${{ inputs.python-version }} use-cache: ${{ inputs.use-python-cache }} - - name: "Create virtual environment" + # NOTE: Installation of poetry in a separate environment to the project to + # avoid situations in which both poetry and the project have shared + # dependencies with different version. This can lead to CICD failures. For + # more information, see https://github.com/ansys/actions/pull/560 + - name: "Add pipx/bin directory to Github Path" + if: env.BUILD_BACKEND == 'poetry' + shell: bash + run: echo "${{ runner.temp }}/pipx/bin" >> $GITHUB_PATH + + # NOTE: Poetry uses virtual environments when installing a project. As we + # want to control that creation, we store POETRY_VIRTUALENVS_CREATE=false + # in the GitHub environment. + - name: "Set poetry environment variable(s)" + if: env.BUILD_BACKEND == 'poetry' + shell: bash + run: echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENVs + + # NOTE: Install pipx in a location that can be used in following CICD jobs + # but ensure that poetry is installed in a temporary folder cleaned before + # and after each job. This way poetry is kinda "installed at system level" + # making it available in the following call and installed in a different + # environment from the project. + - name: "Install poetry and create a virtual environment" + if: env.BUILD_BACKEND == 'poetry' + shell: bash + run: | + python -m pip install pipx + python -m pipx install poetry + python -m venv .venv + env: + PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin + PIPX_HOME : ${{ runner.temp }}/pipx/home + + - name: "Create a virtual environment" + if: env.BUILD_BACKEND == 'pip' shell: bash run: | python -m venv .venv + # ------------------------------------------------------------------------ + - name: "Update pip" shell: bash run: | From 6e4a99412fd9673b6abf2de1645f7e47477cc05d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morais?= <146729917+SMoraisAnsys@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:13:20 +0200 Subject: [PATCH 16/19] Update _doc-build-linux/action.yml Co-authored-by: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> --- _doc-build-linux/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/_doc-build-linux/action.yml b/_doc-build-linux/action.yml index e4cd0ca2e..1d345eb2e 100644 --- a/_doc-build-linux/action.yml +++ b/_doc-build-linux/action.yml @@ -329,7 +329,6 @@ runs: shell: bash run: | source .venv/bin/activate - cd doc xvfb-run ${{ env.SPHINX_BUILD_MAKE }} -C doc html SPHINXOPTS="${{ inputs.sphinxopts }}" xvfb-run ${{ env.SPHINX_BUILD_MAKE }} -C doc pdf if [[ ${{ inputs.check-links }} == 'true' ]]; From 260dd755adb2373426ab468c5bd213c1cf54779f Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Mon, 23 Sep 2024 17:14:24 +0200 Subject: [PATCH 17/19] tbr: use branch private action for testing --- doc-build/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc-build/action.yml b/doc-build/action.yml index 6a6ad82f6..3d55bfabe 100644 --- a/doc-build/action.yml +++ b/doc-build/action.yml @@ -201,7 +201,7 @@ runs: - name: Documentation build (Linux) if: ${{ runner.os == 'Linux' }} - uses: ansys/actions/_doc-build-linux@main + uses: ansys/actions/_doc-build-linux@fix/inconsistent-behavior with: sphinxopts: ${{ inputs.sphinxopts }} dependencies: ${{ inputs.dependencies }} @@ -226,7 +226,7 @@ runs: - name: Documentation build (Windows) if: ${{ runner.os == 'Windows' }} - uses: ansys/actions/_doc-build-windows@main + uses: ansys/actions/_doc-build-windows@fix/inconsistent-behavior with: sphinxopts: ${{ inputs.sphinxopts }} dependencies: ${{ inputs.dependencies }} From d25472912c38fccc8473c0eb4e3ea36721a8cf75 Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Tue, 24 Sep 2024 09:53:44 +0200 Subject: [PATCH 18/19] fix: typo in Github env variable --- _doc-build-linux/action.yml | 2 +- check-vulnerabilities/action.yml | 2 +- code-style/action.yml | 2 +- tests-pytest/action.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_doc-build-linux/action.yml b/_doc-build-linux/action.yml index 1d345eb2e..9db21de05 100644 --- a/_doc-build-linux/action.yml +++ b/_doc-build-linux/action.yml @@ -234,7 +234,7 @@ runs: - name: "Set poetry environment variable(s)" if: env.BUILD_BACKEND == 'poetry' shell: bash - run: echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENVs + run: echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENV # NOTE: Install pipx in a location that can be used in following CICD jobs # but ensure that poetry is installed in a temporary folder cleaned before diff --git a/check-vulnerabilities/action.yml b/check-vulnerabilities/action.yml index 16c7a57c3..d0420e629 100644 --- a/check-vulnerabilities/action.yml +++ b/check-vulnerabilities/action.yml @@ -238,7 +238,7 @@ runs: - name: "Set poetry environment variable(s)" if: env.BUILD_BACKEND == 'poetry' shell: bash - run: echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENVs + run: echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENV # NOTE: Install pipx in a location that can be used in following CICD jobs # but ensure that poetry is installed in a temporary folder cleaned before diff --git a/code-style/action.yml b/code-style/action.yml index b7440befe..fd39581c5 100644 --- a/code-style/action.yml +++ b/code-style/action.yml @@ -148,7 +148,7 @@ runs: - name: "Set poetry environment variable(s)" if: env.BUILD_BACKEND == 'poetry' shell: bash - run: echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENVs + run: echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENV # NOTE: Install pipx in a location that can be used in following CICD jobs # but ensure that poetry is installed in a temporary folder cleaned before diff --git a/tests-pytest/action.yml b/tests-pytest/action.yml index c47cb0511..b2c6b4e5f 100644 --- a/tests-pytest/action.yml +++ b/tests-pytest/action.yml @@ -153,7 +153,7 @@ runs: - name: "Set poetry environment variable(s)" if: env.BUILD_BACKEND == 'poetry' shell: bash - run: echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENVs + run: echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENV # NOTE: Install pipx in a location that can be used in following CICD jobs # but ensure that poetry is installed in a temporary folder cleaned before From daf9a9f4ce69b0309c98b09ef58c7519a5040d36 Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Tue, 24 Sep 2024 11:58:13 +0200 Subject: [PATCH 19/19] Revert "tbr: use branch private action for testing" This reverts commit 260dd755adb2373426ab468c5bd213c1cf54779f. --- doc-build/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc-build/action.yml b/doc-build/action.yml index 3d55bfabe..6a6ad82f6 100644 --- a/doc-build/action.yml +++ b/doc-build/action.yml @@ -201,7 +201,7 @@ runs: - name: Documentation build (Linux) if: ${{ runner.os == 'Linux' }} - uses: ansys/actions/_doc-build-linux@fix/inconsistent-behavior + uses: ansys/actions/_doc-build-linux@main with: sphinxopts: ${{ inputs.sphinxopts }} dependencies: ${{ inputs.dependencies }} @@ -226,7 +226,7 @@ runs: - name: Documentation build (Windows) if: ${{ runner.os == 'Windows' }} - uses: ansys/actions/_doc-build-windows@fix/inconsistent-behavior + uses: ansys/actions/_doc-build-windows@main with: sphinxopts: ${{ inputs.sphinxopts }} dependencies: ${{ inputs.dependencies }}