From f392b91554788774ba25de4381be253847aeba76 Mon Sep 17 00:00:00 2001 From: Camille <78221213+clatapie@users.noreply.github.com> Date: Wed, 29 May 2024 11:57:46 +0200 Subject: [PATCH] maint: cicd --- .github/workflows/ci_cd.yml | 44 ++++++++++++++----------------------- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 381eb26a..4413d411 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -34,37 +34,27 @@ permissions: jobs: - style: - name: Code style + code-style: + name: "Code style" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 + - name: PyAnsys code style checks + uses: ansys/actions/code-style@v6 with: python-version: ${{ env.MAIN_PYTHON_VERSION }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip tox - - name: Test with tox - run: tox -e style doc-style: - name: Documentation Style Check + name: "Documentation Style Check" runs-on: ubuntu-latest steps: - # TODO - Fix codestyle issues - # - name: PyAnsys documentation style checks - # uses: ansys/actions/doc-style@v4 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # vale-version: "2.29.6" - - name : TODO - Reactivate code style - run : sleep 1 + - name: "PyAnsys documentation style checks" + uses: ansys/actions/doc-style@v6 + with: + token: ${{ secrets.GITHUB_TOKEN }} doc-build: name: "Documentation building" - needs: [style, doc-style] + needs: [code-style, doc-style] timeout-minutes: 60 outputs: PYMAPDL_VERSION: ${{ steps.version.outputs.PYMAPDL_VERSION }} @@ -74,7 +64,7 @@ jobs: PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners PYMAPDL_START_INSTANCE: FALSE ON_DOCUMENTATION: TRUE - + steps: - name: "Install Git and checkout project" uses: actions/checkout@v4 @@ -106,14 +96,14 @@ jobs: run: | sudo apt-get update sudo apt install zip pandoc libgl1-mesa-glx xvfb texlive-latex-extra latexmk graphviz texlive-xetex libgomp1 - + - name: "Set up Python using cache" uses: actions/setup-python@v5 with: python-version: ${{ env.MAIN_PYTHON_VERSION }} cache: 'pip' cache-dependency-path: 'requirements/requirements_doc.txt' - + - name: "Install Python requirements" run: | pip uninstall ansys-mapdl-core @@ -172,7 +162,7 @@ jobs: folder: doc/_build/html clean: true single-commit: true - + - name: "Display Docker files structures" if: always() env: @@ -180,7 +170,7 @@ jobs: LOG_NAMES: logs-build-docs run: | .ci/display_logs.sh - + - name: "Collect MAPDL logs on failure" if: always() env: @@ -189,14 +179,14 @@ jobs: LOG_NAMES: logs-build-docs run: | .ci/collect_mapdl_logs.sh - + - name: "Tar logs" if: always() run: | cp -f doc/_build/latex/*.log ./logs-build-docs/ cp log.txt ./logs-build-docs/ tar cvzf ./logs-build-docs.tgz ./logs-build-docs - + - name: "Upload logs to GitHub" if: always() uses: actions/upload-artifact@v4