From 73665618064a4b07ed89e5bfcd7f67af72a514c2 Mon Sep 17 00:00:00 2001 From: Doug Addy Date: Thu, 2 May 2024 16:11:46 +0100 Subject: [PATCH 01/11] Update ci_cd.yml --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index ce9500c8..ba5c7bb6 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -153,7 +153,7 @@ jobs: run: tox -- --with-kerberos - name: Upload coverage report - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 if: ${{ github.actor != 'dependabot[bot]' }} with: fail_ci_if_error: true From 1aaab54720799095b670c0c59ec0a554c2269b8e Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot Date: Thu, 2 May 2024 15:13:18 +0000 Subject: [PATCH 02/11] Adding changelog entry: 575.changed.md --- doc/changelog.d/575.changed.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/575.changed.md diff --git a/doc/changelog.d/575.changed.md b/doc/changelog.d/575.changed.md new file mode 100644 index 00000000..6b853c7b --- /dev/null +++ b/doc/changelog.d/575.changed.md @@ -0,0 +1 @@ +CI - 574 - Update codecov action to v4 \ No newline at end of file From 5447435285d07d276b90f5bba90daf962360024a Mon Sep 17 00:00:00 2001 From: klmcadams Date: Thu, 2 May 2024 15:00:29 -0400 Subject: [PATCH 03/11] try to ignore doc/changelog.d --- doc/.vale.ini | 2 +- doc/styles/.gitignore | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/.vale.ini b/doc/.vale.ini index cda2234b..6b3bad4d 100644 --- a/doc/.vale.ini +++ b/doc/.vale.ini @@ -22,7 +22,7 @@ Packages = Google # Define the Ansys vocabulary Vocab = ANSYS -[*.{md,rst}] +[*.{md,rst},!doc/changelog.d/*.md] # Apply the following styles BasedOnStyles = Vale, Google diff --git a/doc/styles/.gitignore b/doc/styles/.gitignore index 080f12aa..df3814a9 100644 --- a/doc/styles/.gitignore +++ b/doc/styles/.gitignore @@ -1,4 +1,6 @@ * -!Vocab -!Vocab/** +!config +!config/vocabularies +!config/vocabularies/ANSYS +!config/vocabularies/ANSYS/** !.gitignore \ No newline at end of file From 07b900490cb609c9b800d4a4d42b6c87a4d57585 Mon Sep 17 00:00:00 2001 From: klmcadams Date: Thu, 2 May 2024 16:05:40 -0400 Subject: [PATCH 04/11] test changelog.d is ignored & other files are not --- .github/workflows/ci_cd.yml | 2 +- doc/.vale.ini | 2 +- doc/source/contributing.rst | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index ba5c7bb6..7ea2bd53 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest steps: - name: PyAnsys documentation style checks - uses: ansys/actions/doc-style@v6 + uses: ansys/actions/doc-style@maint/vale-ignore-changelogd with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/doc/.vale.ini b/doc/.vale.ini index 6b3bad4d..cda2234b 100644 --- a/doc/.vale.ini +++ b/doc/.vale.ini @@ -22,7 +22,7 @@ Packages = Google # Define the Ansys vocabulary Vocab = ANSYS -[*.{md,rst},!doc/changelog.d/*.md] +[*.{md,rst}] # Apply the following styles BasedOnStyles = Vale, Google diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index 9b089138..c122e551 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -10,6 +10,7 @@ with this guide before attempting to contribute to OpenAPI-Common. The following contribution information is specific to OpenAPI-Common. +our test comment Clone the repository -------------------- From 58da0f0919c9a14e49d8801df12d20bcc66ed035 Mon Sep 17 00:00:00 2001 From: klmcadams Date: Thu, 2 May 2024 16:11:50 -0400 Subject: [PATCH 05/11] test that v6 catches vale warning --- .github/workflows/ci_cd.yml | 398 ++++++++++++++++++------------------ doc/source/contributing.rst | 2 +- 2 files changed, 200 insertions(+), 200 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 7ea2bd53..324c1b8a 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -30,205 +30,205 @@ jobs: runs-on: ubuntu-latest steps: - name: PyAnsys documentation style checks - uses: ansys/actions/doc-style@maint/vale-ignore-changelogd + uses: ansys/actions/doc-style@v6 with: token: ${{ secrets.GITHUB_TOKEN }} - doc-build: - name: Build Documentation - runs-on: ubuntu-latest - needs: doc-style - - steps: - - name: "Checkout the repository" - uses: actions/checkout@v4 - - - name: "Set up Python" - uses: actions/setup-python@v5 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - - - name: "Install system dependencies" - run: | - sudo apt-get update && sudo apt-get install pandoc libkrb5-dev - - - name: "Install Python dependencies" - run: | - python -m pip install --upgrade pip tox - python -m pip install poetry~=1.7.0 - - - name: Install library - run: | - poetry install --with docs --extras "oidc linux-kerberos" - - - name: Build HTML - run: make -C doc html SPHINXOPTS="-W" - - - name: Build PDF Documentation - run: | - sudo apt update - sudo apt-get install -y texlive-latex-extra latexmk texlive-xetex fonts-freefont-otf xindy - make -C doc latexpdf - - - name: Upload HTML Documentation - uses: actions/upload-artifact@v4 - with: - name: documentation-html - path: doc/build/html - retention-days: 7 - - - name: Upload PDF Documentation - uses: actions/upload-artifact@v4 - with: - name: documentation-pdf - path: doc/build/latex/*.pdf - retention-days: 7 - - smoke-tests: - name: "Build wheelhouse for latest Python versions" - runs-on: ${{ matrix.os }} - needs: code-style - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - python-version: ['3.9', '3.10', '3.11', '3.12'] - steps: - - name: Install kerberos headers - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt install libkrb5-dev - - - uses: ansys/actions/build-wheelhouse@v6 - with: - library-name: ${{ env.LIBRARY_NAME }} - operating-system: ${{ matrix.os }} - python-version: ${{ matrix.python-version }} - - tests: - name: Unit test on supported platforms - runs-on: ubuntu-latest - needs: smoke-tests - services: - # Label used to access the service container - kdc-server: - # Github container registry address - image: ghcr.io/ansys/kdc-container:v0.2 - credentials: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - volumes: - # This is needed otherwise there won't be enough entropy to generate a new kerberos realm - - /dev/urandom:/dev/random - - /tmp/keytabs:/tmp/keytabs - ports: - - 749:749 - - 88:88/udp - - container: - image: python:${{ matrix.python-version }} - volumes: - - /tmp/keytabs:/tmp/keytabs - strategy: - matrix: - python-version: ['3.9', '3.10', '3.11', '3.12'] - - steps: - - uses: actions/checkout@v4 - - - name: Configure host kerberos - run: | - apt update - export DEBIAN_FRONTEND=noninteractive - apt install -yq krb5-user - cp ./tests/integration/krb5.conf /etc/krb5.conf - ./tests/integration/configure_keytab.sh - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install 'tox<4' poetry - - - name: Test with tox - run: tox -- --with-kerberos - - - name: Upload coverage report - uses: codecov/codecov-action@v4 - if: ${{ github.actor != 'dependabot[bot]' }} - with: - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} - - build-library: - name: "Build library" - runs-on: ubuntu-latest - needs: [ doc-build, tests ] - steps: - - name: Install kerberos headers - run: | - sudo apt-get update - sudo apt install libkrb5-dev - - - uses: ansys/actions/build-library@v6 - with: - library-name: ${{ env.LIBRARY_NAME }} - python-version: ${{ env.MAIN_PYTHON_VERSION }} - - update-changelog: - name: "Update CHANGELOG for new tag" - if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - steps: - - uses: ansys/actions/doc-deploy-changelog@v6 - with: - token: ${{ '{{ secrets.PYANSYS_CI_BOT_TOKEN }}' }} - - release: - name: "Release" - if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - needs: [build-library, update-changelog] - runs-on: ubuntu-latest - steps: - - uses: ansys/actions/release-pypi-public@v6 - name: "Release to public PyPI" - with: - library-name: ${{ env.LIBRARY_NAME }} - twine-username: "__token__" - twine-token: ${{ secrets.PYPI_TOKEN }} - - - uses: ansys/actions/release-github@v6 - name: "Release to GitHub" - with: - library-name: ${{ env.LIBRARY_NAME }} - - doc-deploy-stable: - name: "Deploy stable documentation" - runs-on: ubuntu-latest - needs: release - if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - steps: - - uses: actions/checkout@v4 - - - name: Get Bot Application Token - id: get_workflow_token - uses: peter-murray/workflow-application-token-action@v3 - with: - application_id: ${{ secrets.BOT_APPLICATION_ID }} - application_private_key: ${{ secrets.BOT_APPLICATION_PRIVATE_KEY }} - - - uses: actions/download-artifact@v4 - with: - name: documentation-html - path: ~/html - - - name: Deploy - uses: JamesIves/github-pages-deploy-action@v4.6.0 - with: - repository-name: pyansys/openapi-common-docs - token: ${{ steps.get_workflow_token.outputs.token }} - BRANCH: gh-pages - FOLDER: ~/html - CLEAN: true + # doc-build: + # name: Build Documentation + # runs-on: ubuntu-latest + # needs: doc-style + + # steps: + # - name: "Checkout the repository" + # uses: actions/checkout@v4 + + # - name: "Set up Python" + # uses: actions/setup-python@v5 + # with: + # python-version: ${{ env.MAIN_PYTHON_VERSION }} + + # - name: "Install system dependencies" + # run: | + # sudo apt-get update && sudo apt-get install pandoc libkrb5-dev + + # - name: "Install Python dependencies" + # run: | + # python -m pip install --upgrade pip tox + # python -m pip install poetry~=1.7.0 + + # - name: Install library + # run: | + # poetry install --with docs --extras "oidc linux-kerberos" + + # - name: Build HTML + # run: make -C doc html SPHINXOPTS="-W" + + # - name: Build PDF Documentation + # run: | + # sudo apt update + # sudo apt-get install -y texlive-latex-extra latexmk texlive-xetex fonts-freefont-otf xindy + # make -C doc latexpdf + + # - name: Upload HTML Documentation + # uses: actions/upload-artifact@v4 + # with: + # name: documentation-html + # path: doc/build/html + # retention-days: 7 + + # - name: Upload PDF Documentation + # uses: actions/upload-artifact@v4 + # with: + # name: documentation-pdf + # path: doc/build/latex/*.pdf + # retention-days: 7 + + # smoke-tests: + # name: "Build wheelhouse for latest Python versions" + # runs-on: ${{ matrix.os }} + # needs: code-style + # strategy: + # matrix: + # os: [ubuntu-latest, windows-latest] + # python-version: ['3.9', '3.10', '3.11', '3.12'] + # steps: + # - name: Install kerberos headers + # if: matrix.os == 'ubuntu-latest' + # run: | + # sudo apt-get update + # sudo apt install libkrb5-dev + + # - uses: ansys/actions/build-wheelhouse@v6 + # with: + # library-name: ${{ env.LIBRARY_NAME }} + # operating-system: ${{ matrix.os }} + # python-version: ${{ matrix.python-version }} + + # tests: + # name: Unit test on supported platforms + # runs-on: ubuntu-latest + # needs: smoke-tests + # services: + # # Label used to access the service container + # kdc-server: + # # Github container registry address + # image: ghcr.io/ansys/kdc-container:v0.2 + # credentials: + # username: ${{ github.actor }} + # password: ${{ secrets.GITHUB_TOKEN }} + # volumes: + # # This is needed otherwise there won't be enough entropy to generate a new kerberos realm + # - /dev/urandom:/dev/random + # - /tmp/keytabs:/tmp/keytabs + # ports: + # - 749:749 + # - 88:88/udp + + # container: + # image: python:${{ matrix.python-version }} + # volumes: + # - /tmp/keytabs:/tmp/keytabs + # strategy: + # matrix: + # python-version: ['3.9', '3.10', '3.11', '3.12'] + + # steps: + # - uses: actions/checkout@v4 + + # - name: Configure host kerberos + # run: | + # apt update + # export DEBIAN_FRONTEND=noninteractive + # apt install -yq krb5-user + # cp ./tests/integration/krb5.conf /etc/krb5.conf + # ./tests/integration/configure_keytab.sh + + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip + # pip install 'tox<4' poetry + + # - name: Test with tox + # run: tox -- --with-kerberos + + # - name: Upload coverage report + # uses: codecov/codecov-action@v4 + # if: ${{ github.actor != 'dependabot[bot]' }} + # with: + # fail_ci_if_error: true + # token: ${{ secrets.CODECOV_TOKEN }} + + # build-library: + # name: "Build library" + # runs-on: ubuntu-latest + # needs: [ doc-build, tests ] + # steps: + # - name: Install kerberos headers + # run: | + # sudo apt-get update + # sudo apt install libkrb5-dev + + # - uses: ansys/actions/build-library@v6 + # with: + # library-name: ${{ env.LIBRARY_NAME }} + # python-version: ${{ env.MAIN_PYTHON_VERSION }} + + # update-changelog: + # name: "Update CHANGELOG for new tag" + # if: github.event_name == 'push' && contains(github.ref, 'refs/tags') + # runs-on: ubuntu-latest + # permissions: + # contents: write + # pull-requests: write + # steps: + # - uses: ansys/actions/doc-deploy-changelog@v6 + # with: + # token: ${{ '{{ secrets.PYANSYS_CI_BOT_TOKEN }}' }} + + # release: + # name: "Release" + # if: github.event_name == 'push' && contains(github.ref, 'refs/tags') + # needs: [build-library, update-changelog] + # runs-on: ubuntu-latest + # steps: + # - uses: ansys/actions/release-pypi-public@v6 + # name: "Release to public PyPI" + # with: + # library-name: ${{ env.LIBRARY_NAME }} + # twine-username: "__token__" + # twine-token: ${{ secrets.PYPI_TOKEN }} + + # - uses: ansys/actions/release-github@v6 + # name: "Release to GitHub" + # with: + # library-name: ${{ env.LIBRARY_NAME }} + + # doc-deploy-stable: + # name: "Deploy stable documentation" + # runs-on: ubuntu-latest + # needs: release + # if: github.event_name == 'push' && contains(github.ref, 'refs/tags') + # steps: + # - uses: actions/checkout@v4 + + # - name: Get Bot Application Token + # id: get_workflow_token + # uses: peter-murray/workflow-application-token-action@v3 + # with: + # application_id: ${{ secrets.BOT_APPLICATION_ID }} + # application_private_key: ${{ secrets.BOT_APPLICATION_PRIVATE_KEY }} + + # - uses: actions/download-artifact@v4 + # with: + # name: documentation-html + # path: ~/html + + # - name: Deploy + # uses: JamesIves/github-pages-deploy-action@v4.6.0 + # with: + # repository-name: pyansys/openapi-common-docs + # token: ${{ steps.get_workflow_token.outputs.token }} + # BRANCH: gh-pages + # FOLDER: ~/html + # CLEAN: true diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index c122e551..407dc0da 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -10,7 +10,7 @@ with this guide before attempting to contribute to OpenAPI-Common. The following contribution information is specific to OpenAPI-Common. -our test comment +We are testing. Clone the repository -------------------- From 703fb2555e690e2f28b8cea3eb1e5549a18cc1ce Mon Sep 17 00:00:00 2001 From: klmcadams Date: Thu, 2 May 2024 16:13:42 -0400 Subject: [PATCH 06/11] check that changelog.d is only ignored --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 324c1b8a..94c792df 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest steps: - name: PyAnsys documentation style checks - uses: ansys/actions/doc-style@v6 + uses: ansys/actions/doc-style@maint/vale-ignore-changelogd with: token: ${{ secrets.GITHUB_TOKEN }} From 238e2334d984d94baa653d315c15a3a7654218a7 Mon Sep 17 00:00:00 2001 From: klmcadams Date: Thu, 2 May 2024 16:22:48 -0400 Subject: [PATCH 07/11] uncomment ci_cd & remove test line from contributing.rst --- .github/workflows/ci_cd.yml | 396 ++++++++++++++++++------------------ doc/source/contributing.rst | 1 - 2 files changed, 198 insertions(+), 199 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 94c792df..7ea2bd53 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -34,201 +34,201 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - # doc-build: - # name: Build Documentation - # runs-on: ubuntu-latest - # needs: doc-style - - # steps: - # - name: "Checkout the repository" - # uses: actions/checkout@v4 - - # - name: "Set up Python" - # uses: actions/setup-python@v5 - # with: - # python-version: ${{ env.MAIN_PYTHON_VERSION }} - - # - name: "Install system dependencies" - # run: | - # sudo apt-get update && sudo apt-get install pandoc libkrb5-dev - - # - name: "Install Python dependencies" - # run: | - # python -m pip install --upgrade pip tox - # python -m pip install poetry~=1.7.0 - - # - name: Install library - # run: | - # poetry install --with docs --extras "oidc linux-kerberos" - - # - name: Build HTML - # run: make -C doc html SPHINXOPTS="-W" - - # - name: Build PDF Documentation - # run: | - # sudo apt update - # sudo apt-get install -y texlive-latex-extra latexmk texlive-xetex fonts-freefont-otf xindy - # make -C doc latexpdf - - # - name: Upload HTML Documentation - # uses: actions/upload-artifact@v4 - # with: - # name: documentation-html - # path: doc/build/html - # retention-days: 7 - - # - name: Upload PDF Documentation - # uses: actions/upload-artifact@v4 - # with: - # name: documentation-pdf - # path: doc/build/latex/*.pdf - # retention-days: 7 - - # smoke-tests: - # name: "Build wheelhouse for latest Python versions" - # runs-on: ${{ matrix.os }} - # needs: code-style - # strategy: - # matrix: - # os: [ubuntu-latest, windows-latest] - # python-version: ['3.9', '3.10', '3.11', '3.12'] - # steps: - # - name: Install kerberos headers - # if: matrix.os == 'ubuntu-latest' - # run: | - # sudo apt-get update - # sudo apt install libkrb5-dev - - # - uses: ansys/actions/build-wheelhouse@v6 - # with: - # library-name: ${{ env.LIBRARY_NAME }} - # operating-system: ${{ matrix.os }} - # python-version: ${{ matrix.python-version }} - - # tests: - # name: Unit test on supported platforms - # runs-on: ubuntu-latest - # needs: smoke-tests - # services: - # # Label used to access the service container - # kdc-server: - # # Github container registry address - # image: ghcr.io/ansys/kdc-container:v0.2 - # credentials: - # username: ${{ github.actor }} - # password: ${{ secrets.GITHUB_TOKEN }} - # volumes: - # # This is needed otherwise there won't be enough entropy to generate a new kerberos realm - # - /dev/urandom:/dev/random - # - /tmp/keytabs:/tmp/keytabs - # ports: - # - 749:749 - # - 88:88/udp - - # container: - # image: python:${{ matrix.python-version }} - # volumes: - # - /tmp/keytabs:/tmp/keytabs - # strategy: - # matrix: - # python-version: ['3.9', '3.10', '3.11', '3.12'] - - # steps: - # - uses: actions/checkout@v4 - - # - name: Configure host kerberos - # run: | - # apt update - # export DEBIAN_FRONTEND=noninteractive - # apt install -yq krb5-user - # cp ./tests/integration/krb5.conf /etc/krb5.conf - # ./tests/integration/configure_keytab.sh - - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # pip install 'tox<4' poetry - - # - name: Test with tox - # run: tox -- --with-kerberos - - # - name: Upload coverage report - # uses: codecov/codecov-action@v4 - # if: ${{ github.actor != 'dependabot[bot]' }} - # with: - # fail_ci_if_error: true - # token: ${{ secrets.CODECOV_TOKEN }} - - # build-library: - # name: "Build library" - # runs-on: ubuntu-latest - # needs: [ doc-build, tests ] - # steps: - # - name: Install kerberos headers - # run: | - # sudo apt-get update - # sudo apt install libkrb5-dev - - # - uses: ansys/actions/build-library@v6 - # with: - # library-name: ${{ env.LIBRARY_NAME }} - # python-version: ${{ env.MAIN_PYTHON_VERSION }} - - # update-changelog: - # name: "Update CHANGELOG for new tag" - # if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - # runs-on: ubuntu-latest - # permissions: - # contents: write - # pull-requests: write - # steps: - # - uses: ansys/actions/doc-deploy-changelog@v6 - # with: - # token: ${{ '{{ secrets.PYANSYS_CI_BOT_TOKEN }}' }} - - # release: - # name: "Release" - # if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - # needs: [build-library, update-changelog] - # runs-on: ubuntu-latest - # steps: - # - uses: ansys/actions/release-pypi-public@v6 - # name: "Release to public PyPI" - # with: - # library-name: ${{ env.LIBRARY_NAME }} - # twine-username: "__token__" - # twine-token: ${{ secrets.PYPI_TOKEN }} - - # - uses: ansys/actions/release-github@v6 - # name: "Release to GitHub" - # with: - # library-name: ${{ env.LIBRARY_NAME }} - - # doc-deploy-stable: - # name: "Deploy stable documentation" - # runs-on: ubuntu-latest - # needs: release - # if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - # steps: - # - uses: actions/checkout@v4 - - # - name: Get Bot Application Token - # id: get_workflow_token - # uses: peter-murray/workflow-application-token-action@v3 - # with: - # application_id: ${{ secrets.BOT_APPLICATION_ID }} - # application_private_key: ${{ secrets.BOT_APPLICATION_PRIVATE_KEY }} - - # - uses: actions/download-artifact@v4 - # with: - # name: documentation-html - # path: ~/html - - # - name: Deploy - # uses: JamesIves/github-pages-deploy-action@v4.6.0 - # with: - # repository-name: pyansys/openapi-common-docs - # token: ${{ steps.get_workflow_token.outputs.token }} - # BRANCH: gh-pages - # FOLDER: ~/html - # CLEAN: true + doc-build: + name: Build Documentation + runs-on: ubuntu-latest + needs: doc-style + + steps: + - name: "Checkout the repository" + uses: actions/checkout@v4 + + - name: "Set up Python" + uses: actions/setup-python@v5 + with: + python-version: ${{ env.MAIN_PYTHON_VERSION }} + + - name: "Install system dependencies" + run: | + sudo apt-get update && sudo apt-get install pandoc libkrb5-dev + + - name: "Install Python dependencies" + run: | + python -m pip install --upgrade pip tox + python -m pip install poetry~=1.7.0 + + - name: Install library + run: | + poetry install --with docs --extras "oidc linux-kerberos" + + - name: Build HTML + run: make -C doc html SPHINXOPTS="-W" + + - name: Build PDF Documentation + run: | + sudo apt update + sudo apt-get install -y texlive-latex-extra latexmk texlive-xetex fonts-freefont-otf xindy + make -C doc latexpdf + + - name: Upload HTML Documentation + uses: actions/upload-artifact@v4 + with: + name: documentation-html + path: doc/build/html + retention-days: 7 + + - name: Upload PDF Documentation + uses: actions/upload-artifact@v4 + with: + name: documentation-pdf + path: doc/build/latex/*.pdf + retention-days: 7 + + smoke-tests: + name: "Build wheelhouse for latest Python versions" + runs-on: ${{ matrix.os }} + needs: code-style + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + python-version: ['3.9', '3.10', '3.11', '3.12'] + steps: + - name: Install kerberos headers + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt install libkrb5-dev + + - uses: ansys/actions/build-wheelhouse@v6 + with: + library-name: ${{ env.LIBRARY_NAME }} + operating-system: ${{ matrix.os }} + python-version: ${{ matrix.python-version }} + + tests: + name: Unit test on supported platforms + runs-on: ubuntu-latest + needs: smoke-tests + services: + # Label used to access the service container + kdc-server: + # Github container registry address + image: ghcr.io/ansys/kdc-container:v0.2 + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + volumes: + # This is needed otherwise there won't be enough entropy to generate a new kerberos realm + - /dev/urandom:/dev/random + - /tmp/keytabs:/tmp/keytabs + ports: + - 749:749 + - 88:88/udp + + container: + image: python:${{ matrix.python-version }} + volumes: + - /tmp/keytabs:/tmp/keytabs + strategy: + matrix: + python-version: ['3.9', '3.10', '3.11', '3.12'] + + steps: + - uses: actions/checkout@v4 + + - name: Configure host kerberos + run: | + apt update + export DEBIAN_FRONTEND=noninteractive + apt install -yq krb5-user + cp ./tests/integration/krb5.conf /etc/krb5.conf + ./tests/integration/configure_keytab.sh + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install 'tox<4' poetry + + - name: Test with tox + run: tox -- --with-kerberos + + - name: Upload coverage report + uses: codecov/codecov-action@v4 + if: ${{ github.actor != 'dependabot[bot]' }} + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + + build-library: + name: "Build library" + runs-on: ubuntu-latest + needs: [ doc-build, tests ] + steps: + - name: Install kerberos headers + run: | + sudo apt-get update + sudo apt install libkrb5-dev + + - uses: ansys/actions/build-library@v6 + with: + library-name: ${{ env.LIBRARY_NAME }} + python-version: ${{ env.MAIN_PYTHON_VERSION }} + + update-changelog: + name: "Update CHANGELOG for new tag" + if: github.event_name == 'push' && contains(github.ref, 'refs/tags') + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - uses: ansys/actions/doc-deploy-changelog@v6 + with: + token: ${{ '{{ secrets.PYANSYS_CI_BOT_TOKEN }}' }} + + release: + name: "Release" + if: github.event_name == 'push' && contains(github.ref, 'refs/tags') + needs: [build-library, update-changelog] + runs-on: ubuntu-latest + steps: + - uses: ansys/actions/release-pypi-public@v6 + name: "Release to public PyPI" + with: + library-name: ${{ env.LIBRARY_NAME }} + twine-username: "__token__" + twine-token: ${{ secrets.PYPI_TOKEN }} + + - uses: ansys/actions/release-github@v6 + name: "Release to GitHub" + with: + library-name: ${{ env.LIBRARY_NAME }} + + doc-deploy-stable: + name: "Deploy stable documentation" + runs-on: ubuntu-latest + needs: release + if: github.event_name == 'push' && contains(github.ref, 'refs/tags') + steps: + - uses: actions/checkout@v4 + + - name: Get Bot Application Token + id: get_workflow_token + uses: peter-murray/workflow-application-token-action@v3 + with: + application_id: ${{ secrets.BOT_APPLICATION_ID }} + application_private_key: ${{ secrets.BOT_APPLICATION_PRIVATE_KEY }} + + - uses: actions/download-artifact@v4 + with: + name: documentation-html + path: ~/html + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4.6.0 + with: + repository-name: pyansys/openapi-common-docs + token: ${{ steps.get_workflow_token.outputs.token }} + BRANCH: gh-pages + FOLDER: ~/html + CLEAN: true diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index 407dc0da..9b089138 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -10,7 +10,6 @@ with this guide before attempting to contribute to OpenAPI-Common. The following contribution information is specific to OpenAPI-Common. -We are testing. Clone the repository -------------------- From 1d30315fcda6b070057b43dbbf96d325e3a2b162 Mon Sep 17 00:00:00 2001 From: klmcadams Date: Thu, 2 May 2024 16:54:41 -0400 Subject: [PATCH 08/11] test changelog.d is not ignored --- .github/workflows/ci_cd.yml | 415 ++++++++++++++++++------------------ doc/source/contributing.rst | 1 + 2 files changed, 209 insertions(+), 207 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 7ea2bd53..048aeba9 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -16,14 +16,14 @@ env: LIBRARY_NAME: 'ansys-openapi-common' jobs: - code-style: - name: "Code style" - runs-on: windows-latest - steps: - - uses: ansys/actions/code-style@v6 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - skip-install: "false" + # code-style: + # name: "Code style" + # runs-on: windows-latest + # steps: + # - uses: ansys/actions/code-style@v6 + # with: + # python-version: ${{ env.MAIN_PYTHON_VERSION }} + # skip-install: "false" doc-style: name: Documentation Style Check @@ -33,202 +33,203 @@ jobs: uses: ansys/actions/doc-style@maint/vale-ignore-changelogd with: token: ${{ secrets.GITHUB_TOKEN }} - - doc-build: - name: Build Documentation - runs-on: ubuntu-latest - needs: doc-style - - steps: - - name: "Checkout the repository" - uses: actions/checkout@v4 - - - name: "Set up Python" - uses: actions/setup-python@v5 - with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} - - - name: "Install system dependencies" - run: | - sudo apt-get update && sudo apt-get install pandoc libkrb5-dev - - - name: "Install Python dependencies" - run: | - python -m pip install --upgrade pip tox - python -m pip install poetry~=1.7.0 - - - name: Install library - run: | - poetry install --with docs --extras "oidc linux-kerberos" - - - name: Build HTML - run: make -C doc html SPHINXOPTS="-W" - - - name: Build PDF Documentation - run: | - sudo apt update - sudo apt-get install -y texlive-latex-extra latexmk texlive-xetex fonts-freefont-otf xindy - make -C doc latexpdf - - - name: Upload HTML Documentation - uses: actions/upload-artifact@v4 - with: - name: documentation-html - path: doc/build/html - retention-days: 7 - - - name: Upload PDF Documentation - uses: actions/upload-artifact@v4 - with: - name: documentation-pdf - path: doc/build/latex/*.pdf - retention-days: 7 - - smoke-tests: - name: "Build wheelhouse for latest Python versions" - runs-on: ${{ matrix.os }} - needs: code-style - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - python-version: ['3.9', '3.10', '3.11', '3.12'] - steps: - - name: Install kerberos headers - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt install libkrb5-dev - - - uses: ansys/actions/build-wheelhouse@v6 - with: - library-name: ${{ env.LIBRARY_NAME }} - operating-system: ${{ matrix.os }} - python-version: ${{ matrix.python-version }} - - tests: - name: Unit test on supported platforms - runs-on: ubuntu-latest - needs: smoke-tests - services: - # Label used to access the service container - kdc-server: - # Github container registry address - image: ghcr.io/ansys/kdc-container:v0.2 - credentials: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - volumes: - # This is needed otherwise there won't be enough entropy to generate a new kerberos realm - - /dev/urandom:/dev/random - - /tmp/keytabs:/tmp/keytabs - ports: - - 749:749 - - 88:88/udp - - container: - image: python:${{ matrix.python-version }} - volumes: - - /tmp/keytabs:/tmp/keytabs - strategy: - matrix: - python-version: ['3.9', '3.10', '3.11', '3.12'] - - steps: - - uses: actions/checkout@v4 - - - name: Configure host kerberos - run: | - apt update - export DEBIAN_FRONTEND=noninteractive - apt install -yq krb5-user - cp ./tests/integration/krb5.conf /etc/krb5.conf - ./tests/integration/configure_keytab.sh - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install 'tox<4' poetry - - - name: Test with tox - run: tox -- --with-kerberos - - - name: Upload coverage report - uses: codecov/codecov-action@v4 - if: ${{ github.actor != 'dependabot[bot]' }} - with: - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} - - build-library: - name: "Build library" - runs-on: ubuntu-latest - needs: [ doc-build, tests ] - steps: - - name: Install kerberos headers - run: | - sudo apt-get update - sudo apt install libkrb5-dev - - - uses: ansys/actions/build-library@v6 - with: - library-name: ${{ env.LIBRARY_NAME }} - python-version: ${{ env.MAIN_PYTHON_VERSION }} - - update-changelog: - name: "Update CHANGELOG for new tag" - if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - steps: - - uses: ansys/actions/doc-deploy-changelog@v6 - with: - token: ${{ '{{ secrets.PYANSYS_CI_BOT_TOKEN }}' }} - - release: - name: "Release" - if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - needs: [build-library, update-changelog] - runs-on: ubuntu-latest - steps: - - uses: ansys/actions/release-pypi-public@v6 - name: "Release to public PyPI" - with: - library-name: ${{ env.LIBRARY_NAME }} - twine-username: "__token__" - twine-token: ${{ secrets.PYPI_TOKEN }} - - - uses: ansys/actions/release-github@v6 - name: "Release to GitHub" - with: - library-name: ${{ env.LIBRARY_NAME }} - - doc-deploy-stable: - name: "Deploy stable documentation" - runs-on: ubuntu-latest - needs: release - if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - steps: - - uses: actions/checkout@v4 - - - name: Get Bot Application Token - id: get_workflow_token - uses: peter-murray/workflow-application-token-action@v3 - with: - application_id: ${{ secrets.BOT_APPLICATION_ID }} - application_private_key: ${{ secrets.BOT_APPLICATION_PRIVATE_KEY }} - - - uses: actions/download-artifact@v4 - with: - name: documentation-html - path: ~/html - - - name: Deploy - uses: JamesIves/github-pages-deploy-action@v4.6.0 - with: - repository-name: pyansys/openapi-common-docs - token: ${{ steps.get_workflow_token.outputs.token }} - BRANCH: gh-pages - FOLDER: ~/html - CLEAN: true + # ignore-changelogd: true + + # doc-build: + # name: Build Documentation + # runs-on: ubuntu-latest + # needs: doc-style + + # steps: + # - name: "Checkout the repository" + # uses: actions/checkout@v4 + + # - name: "Set up Python" + # uses: actions/setup-python@v5 + # with: + # python-version: ${{ env.MAIN_PYTHON_VERSION }} + + # - name: "Install system dependencies" + # run: | + # sudo apt-get update && sudo apt-get install pandoc libkrb5-dev + + # - name: "Install Python dependencies" + # run: | + # python -m pip install --upgrade pip tox + # python -m pip install poetry~=1.7.0 + + # - name: Install library + # run: | + # poetry install --with docs --extras "oidc linux-kerberos" + + # - name: Build HTML + # run: make -C doc html SPHINXOPTS="-W" + + # - name: Build PDF Documentation + # run: | + # sudo apt update + # sudo apt-get install -y texlive-latex-extra latexmk texlive-xetex fonts-freefont-otf xindy + # make -C doc latexpdf + + # - name: Upload HTML Documentation + # uses: actions/upload-artifact@v4 + # with: + # name: documentation-html + # path: doc/build/html + # retention-days: 7 + + # - name: Upload PDF Documentation + # uses: actions/upload-artifact@v4 + # with: + # name: documentation-pdf + # path: doc/build/latex/*.pdf + # retention-days: 7 + + # smoke-tests: + # name: "Build wheelhouse for latest Python versions" + # runs-on: ${{ matrix.os }} + # needs: code-style + # strategy: + # matrix: + # os: [ubuntu-latest, windows-latest] + # python-version: ['3.9', '3.10', '3.11', '3.12'] + # steps: + # - name: Install kerberos headers + # if: matrix.os == 'ubuntu-latest' + # run: | + # sudo apt-get update + # sudo apt install libkrb5-dev + + # - uses: ansys/actions/build-wheelhouse@v6 + # with: + # library-name: ${{ env.LIBRARY_NAME }} + # operating-system: ${{ matrix.os }} + # python-version: ${{ matrix.python-version }} + + # tests: + # name: Unit test on supported platforms + # runs-on: ubuntu-latest + # needs: smoke-tests + # services: + # # Label used to access the service container + # kdc-server: + # # Github container registry address + # image: ghcr.io/ansys/kdc-container:v0.2 + # credentials: + # username: ${{ github.actor }} + # password: ${{ secrets.GITHUB_TOKEN }} + # volumes: + # # This is needed otherwise there won't be enough entropy to generate a new kerberos realm + # - /dev/urandom:/dev/random + # - /tmp/keytabs:/tmp/keytabs + # ports: + # - 749:749 + # - 88:88/udp + + # container: + # image: python:${{ matrix.python-version }} + # volumes: + # - /tmp/keytabs:/tmp/keytabs + # strategy: + # matrix: + # python-version: ['3.9', '3.10', '3.11', '3.12'] + + # steps: + # - uses: actions/checkout@v4 + + # - name: Configure host kerberos + # run: | + # apt update + # export DEBIAN_FRONTEND=noninteractive + # apt install -yq krb5-user + # cp ./tests/integration/krb5.conf /etc/krb5.conf + # ./tests/integration/configure_keytab.sh + + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip + # pip install 'tox<4' poetry + + # - name: Test with tox + # run: tox -- --with-kerberos + + # - name: Upload coverage report + # uses: codecov/codecov-action@v4 + # if: ${{ github.actor != 'dependabot[bot]' }} + # with: + # fail_ci_if_error: true + # token: ${{ secrets.CODECOV_TOKEN }} + + # build-library: + # name: "Build library" + # runs-on: ubuntu-latest + # needs: [ doc-build, tests ] + # steps: + # - name: Install kerberos headers + # run: | + # sudo apt-get update + # sudo apt install libkrb5-dev + + # - uses: ansys/actions/build-library@v6 + # with: + # library-name: ${{ env.LIBRARY_NAME }} + # python-version: ${{ env.MAIN_PYTHON_VERSION }} + + # update-changelog: + # name: "Update CHANGELOG for new tag" + # if: github.event_name == 'push' && contains(github.ref, 'refs/tags') + # runs-on: ubuntu-latest + # permissions: + # contents: write + # pull-requests: write + # steps: + # - uses: ansys/actions/doc-deploy-changelog@v6 + # with: + # token: ${{ '{{ secrets.PYANSYS_CI_BOT_TOKEN }}' }} + + # release: + # name: "Release" + # if: github.event_name == 'push' && contains(github.ref, 'refs/tags') + # needs: [build-library, update-changelog] + # runs-on: ubuntu-latest + # steps: + # - uses: ansys/actions/release-pypi-public@v6 + # name: "Release to public PyPI" + # with: + # library-name: ${{ env.LIBRARY_NAME }} + # twine-username: "__token__" + # twine-token: ${{ secrets.PYPI_TOKEN }} + + # - uses: ansys/actions/release-github@v6 + # name: "Release to GitHub" + # with: + # library-name: ${{ env.LIBRARY_NAME }} + + # doc-deploy-stable: + # name: "Deploy stable documentation" + # runs-on: ubuntu-latest + # needs: release + # if: github.event_name == 'push' && contains(github.ref, 'refs/tags') + # steps: + # - uses: actions/checkout@v4 + + # - name: Get Bot Application Token + # id: get_workflow_token + # uses: peter-murray/workflow-application-token-action@v3 + # with: + # application_id: ${{ secrets.BOT_APPLICATION_ID }} + # application_private_key: ${{ secrets.BOT_APPLICATION_PRIVATE_KEY }} + + # - uses: actions/download-artifact@v4 + # with: + # name: documentation-html + # path: ~/html + + # - name: Deploy + # uses: JamesIves/github-pages-deploy-action@v4.6.0 + # with: + # repository-name: pyansys/openapi-common-docs + # token: ${{ steps.get_workflow_token.outputs.token }} + # BRANCH: gh-pages + # FOLDER: ~/html + # CLEAN: true diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index 9b089138..e2ecc177 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -10,6 +10,7 @@ with this guide before attempting to contribute to OpenAPI-Common. The following contribution information is specific to OpenAPI-Common. +Our test sentence. Clone the repository -------------------- From 93a4d6fbb00057759271a99c660581edb3b1693f Mon Sep 17 00:00:00 2001 From: klmcadams Date: Thu, 2 May 2024 16:58:19 -0400 Subject: [PATCH 09/11] add ignore-changelogd to doc-style --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 048aeba9..1b97f98a 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -33,7 +33,7 @@ jobs: uses: ansys/actions/doc-style@maint/vale-ignore-changelogd with: token: ${{ secrets.GITHUB_TOKEN }} - # ignore-changelogd: true + ignore-changelogd: true # doc-build: # name: Build Documentation From c46b99bd5e4193b5863af2ccaca04718df9eea88 Mon Sep 17 00:00:00 2001 From: klmcadams Date: Thu, 2 May 2024 17:01:08 -0400 Subject: [PATCH 10/11] uncomment ci_cd and remove test sentence from contributing.rst --- .github/workflows/ci_cd.yml | 412 ++++++++++++++++++------------------ doc/source/contributing.rst | 1 - 2 files changed, 206 insertions(+), 207 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 1b97f98a..e17db725 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -16,14 +16,14 @@ env: LIBRARY_NAME: 'ansys-openapi-common' jobs: - # code-style: - # name: "Code style" - # runs-on: windows-latest - # steps: - # - uses: ansys/actions/code-style@v6 - # with: - # python-version: ${{ env.MAIN_PYTHON_VERSION }} - # skip-install: "false" + code-style: + name: "Code style" + runs-on: windows-latest + steps: + - uses: ansys/actions/code-style@v6 + with: + python-version: ${{ env.MAIN_PYTHON_VERSION }} + skip-install: "false" doc-style: name: Documentation Style Check @@ -35,201 +35,201 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} ignore-changelogd: true - # doc-build: - # name: Build Documentation - # runs-on: ubuntu-latest - # needs: doc-style - - # steps: - # - name: "Checkout the repository" - # uses: actions/checkout@v4 - - # - name: "Set up Python" - # uses: actions/setup-python@v5 - # with: - # python-version: ${{ env.MAIN_PYTHON_VERSION }} - - # - name: "Install system dependencies" - # run: | - # sudo apt-get update && sudo apt-get install pandoc libkrb5-dev - - # - name: "Install Python dependencies" - # run: | - # python -m pip install --upgrade pip tox - # python -m pip install poetry~=1.7.0 - - # - name: Install library - # run: | - # poetry install --with docs --extras "oidc linux-kerberos" - - # - name: Build HTML - # run: make -C doc html SPHINXOPTS="-W" - - # - name: Build PDF Documentation - # run: | - # sudo apt update - # sudo apt-get install -y texlive-latex-extra latexmk texlive-xetex fonts-freefont-otf xindy - # make -C doc latexpdf - - # - name: Upload HTML Documentation - # uses: actions/upload-artifact@v4 - # with: - # name: documentation-html - # path: doc/build/html - # retention-days: 7 - - # - name: Upload PDF Documentation - # uses: actions/upload-artifact@v4 - # with: - # name: documentation-pdf - # path: doc/build/latex/*.pdf - # retention-days: 7 - - # smoke-tests: - # name: "Build wheelhouse for latest Python versions" - # runs-on: ${{ matrix.os }} - # needs: code-style - # strategy: - # matrix: - # os: [ubuntu-latest, windows-latest] - # python-version: ['3.9', '3.10', '3.11', '3.12'] - # steps: - # - name: Install kerberos headers - # if: matrix.os == 'ubuntu-latest' - # run: | - # sudo apt-get update - # sudo apt install libkrb5-dev - - # - uses: ansys/actions/build-wheelhouse@v6 - # with: - # library-name: ${{ env.LIBRARY_NAME }} - # operating-system: ${{ matrix.os }} - # python-version: ${{ matrix.python-version }} - - # tests: - # name: Unit test on supported platforms - # runs-on: ubuntu-latest - # needs: smoke-tests - # services: - # # Label used to access the service container - # kdc-server: - # # Github container registry address - # image: ghcr.io/ansys/kdc-container:v0.2 - # credentials: - # username: ${{ github.actor }} - # password: ${{ secrets.GITHUB_TOKEN }} - # volumes: - # # This is needed otherwise there won't be enough entropy to generate a new kerberos realm - # - /dev/urandom:/dev/random - # - /tmp/keytabs:/tmp/keytabs - # ports: - # - 749:749 - # - 88:88/udp - - # container: - # image: python:${{ matrix.python-version }} - # volumes: - # - /tmp/keytabs:/tmp/keytabs - # strategy: - # matrix: - # python-version: ['3.9', '3.10', '3.11', '3.12'] - - # steps: - # - uses: actions/checkout@v4 - - # - name: Configure host kerberos - # run: | - # apt update - # export DEBIAN_FRONTEND=noninteractive - # apt install -yq krb5-user - # cp ./tests/integration/krb5.conf /etc/krb5.conf - # ./tests/integration/configure_keytab.sh - - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # pip install 'tox<4' poetry - - # - name: Test with tox - # run: tox -- --with-kerberos - - # - name: Upload coverage report - # uses: codecov/codecov-action@v4 - # if: ${{ github.actor != 'dependabot[bot]' }} - # with: - # fail_ci_if_error: true - # token: ${{ secrets.CODECOV_TOKEN }} - - # build-library: - # name: "Build library" - # runs-on: ubuntu-latest - # needs: [ doc-build, tests ] - # steps: - # - name: Install kerberos headers - # run: | - # sudo apt-get update - # sudo apt install libkrb5-dev - - # - uses: ansys/actions/build-library@v6 - # with: - # library-name: ${{ env.LIBRARY_NAME }} - # python-version: ${{ env.MAIN_PYTHON_VERSION }} - - # update-changelog: - # name: "Update CHANGELOG for new tag" - # if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - # runs-on: ubuntu-latest - # permissions: - # contents: write - # pull-requests: write - # steps: - # - uses: ansys/actions/doc-deploy-changelog@v6 - # with: - # token: ${{ '{{ secrets.PYANSYS_CI_BOT_TOKEN }}' }} - - # release: - # name: "Release" - # if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - # needs: [build-library, update-changelog] - # runs-on: ubuntu-latest - # steps: - # - uses: ansys/actions/release-pypi-public@v6 - # name: "Release to public PyPI" - # with: - # library-name: ${{ env.LIBRARY_NAME }} - # twine-username: "__token__" - # twine-token: ${{ secrets.PYPI_TOKEN }} - - # - uses: ansys/actions/release-github@v6 - # name: "Release to GitHub" - # with: - # library-name: ${{ env.LIBRARY_NAME }} - - # doc-deploy-stable: - # name: "Deploy stable documentation" - # runs-on: ubuntu-latest - # needs: release - # if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - # steps: - # - uses: actions/checkout@v4 - - # - name: Get Bot Application Token - # id: get_workflow_token - # uses: peter-murray/workflow-application-token-action@v3 - # with: - # application_id: ${{ secrets.BOT_APPLICATION_ID }} - # application_private_key: ${{ secrets.BOT_APPLICATION_PRIVATE_KEY }} - - # - uses: actions/download-artifact@v4 - # with: - # name: documentation-html - # path: ~/html - - # - name: Deploy - # uses: JamesIves/github-pages-deploy-action@v4.6.0 - # with: - # repository-name: pyansys/openapi-common-docs - # token: ${{ steps.get_workflow_token.outputs.token }} - # BRANCH: gh-pages - # FOLDER: ~/html - # CLEAN: true + doc-build: + name: Build Documentation + runs-on: ubuntu-latest + needs: doc-style + + steps: + - name: "Checkout the repository" + uses: actions/checkout@v4 + + - name: "Set up Python" + uses: actions/setup-python@v5 + with: + python-version: ${{ env.MAIN_PYTHON_VERSION }} + + - name: "Install system dependencies" + run: | + sudo apt-get update && sudo apt-get install pandoc libkrb5-dev + + - name: "Install Python dependencies" + run: | + python -m pip install --upgrade pip tox + python -m pip install poetry~=1.7.0 + + - name: Install library + run: | + poetry install --with docs --extras "oidc linux-kerberos" + + - name: Build HTML + run: make -C doc html SPHINXOPTS="-W" + + - name: Build PDF Documentation + run: | + sudo apt update + sudo apt-get install -y texlive-latex-extra latexmk texlive-xetex fonts-freefont-otf xindy + make -C doc latexpdf + + - name: Upload HTML Documentation + uses: actions/upload-artifact@v4 + with: + name: documentation-html + path: doc/build/html + retention-days: 7 + + - name: Upload PDF Documentation + uses: actions/upload-artifact@v4 + with: + name: documentation-pdf + path: doc/build/latex/*.pdf + retention-days: 7 + + smoke-tests: + name: "Build wheelhouse for latest Python versions" + runs-on: ${{ matrix.os }} + needs: code-style + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + python-version: ['3.9', '3.10', '3.11', '3.12'] + steps: + - name: Install kerberos headers + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt install libkrb5-dev + + - uses: ansys/actions/build-wheelhouse@v6 + with: + library-name: ${{ env.LIBRARY_NAME }} + operating-system: ${{ matrix.os }} + python-version: ${{ matrix.python-version }} + + tests: + name: Unit test on supported platforms + runs-on: ubuntu-latest + needs: smoke-tests + services: + # Label used to access the service container + kdc-server: + # Github container registry address + image: ghcr.io/ansys/kdc-container:v0.2 + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + volumes: + # This is needed otherwise there won't be enough entropy to generate a new kerberos realm + - /dev/urandom:/dev/random + - /tmp/keytabs:/tmp/keytabs + ports: + - 749:749 + - 88:88/udp + + container: + image: python:${{ matrix.python-version }} + volumes: + - /tmp/keytabs:/tmp/keytabs + strategy: + matrix: + python-version: ['3.9', '3.10', '3.11', '3.12'] + + steps: + - uses: actions/checkout@v4 + + - name: Configure host kerberos + run: | + apt update + export DEBIAN_FRONTEND=noninteractive + apt install -yq krb5-user + cp ./tests/integration/krb5.conf /etc/krb5.conf + ./tests/integration/configure_keytab.sh + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install 'tox<4' poetry + + - name: Test with tox + run: tox -- --with-kerberos + + - name: Upload coverage report + uses: codecov/codecov-action@v4 + if: ${{ github.actor != 'dependabot[bot]' }} + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + + build-library: + name: "Build library" + runs-on: ubuntu-latest + needs: [ doc-build, tests ] + steps: + - name: Install kerberos headers + run: | + sudo apt-get update + sudo apt install libkrb5-dev + + - uses: ansys/actions/build-library@v6 + with: + library-name: ${{ env.LIBRARY_NAME }} + python-version: ${{ env.MAIN_PYTHON_VERSION }} + + update-changelog: + name: "Update CHANGELOG for new tag" + if: github.event_name == 'push' && contains(github.ref, 'refs/tags') + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - uses: ansys/actions/doc-deploy-changelog@v6 + with: + token: ${{ '{{ secrets.PYANSYS_CI_BOT_TOKEN }}' }} + + release: + name: "Release" + if: github.event_name == 'push' && contains(github.ref, 'refs/tags') + needs: [build-library, update-changelog] + runs-on: ubuntu-latest + steps: + - uses: ansys/actions/release-pypi-public@v6 + name: "Release to public PyPI" + with: + library-name: ${{ env.LIBRARY_NAME }} + twine-username: "__token__" + twine-token: ${{ secrets.PYPI_TOKEN }} + + - uses: ansys/actions/release-github@v6 + name: "Release to GitHub" + with: + library-name: ${{ env.LIBRARY_NAME }} + + doc-deploy-stable: + name: "Deploy stable documentation" + runs-on: ubuntu-latest + needs: release + if: github.event_name == 'push' && contains(github.ref, 'refs/tags') + steps: + - uses: actions/checkout@v4 + + - name: Get Bot Application Token + id: get_workflow_token + uses: peter-murray/workflow-application-token-action@v3 + with: + application_id: ${{ secrets.BOT_APPLICATION_ID }} + application_private_key: ${{ secrets.BOT_APPLICATION_PRIVATE_KEY }} + + - uses: actions/download-artifact@v4 + with: + name: documentation-html + path: ~/html + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4.6.0 + with: + repository-name: pyansys/openapi-common-docs + token: ${{ steps.get_workflow_token.outputs.token }} + BRANCH: gh-pages + FOLDER: ~/html + CLEAN: true diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index e2ecc177..9b089138 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -10,7 +10,6 @@ with this guide before attempting to contribute to OpenAPI-Common. The following contribution information is specific to OpenAPI-Common. -Our test sentence. Clone the repository -------------------- From 316b4b8e969b58d8493ced8d68c24be294cad2c7 Mon Sep 17 00:00:00 2001 From: Doug Addy Date: Tue, 7 May 2024 10:17:58 +0100 Subject: [PATCH 11/11] Update ci_cd.yml --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 07d4c512..d9afd2ba 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-latest steps: - name: PyAnsys documentation style checks - uses: ansys/actions/doc-style@maint/vale-ignore-changelogd + uses: ansys/actions/doc-style@v6 with: token: ${{ secrets.GITHUB_TOKEN }} ignore-changelogd: true