Skip to content

Commit

Permalink
maint: cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
clatapie committed May 29, 2024
1 parent ca38367 commit f392b91
Showing 1 changed file with 17 additions and 27 deletions.
44 changes: 17 additions & 27 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -172,15 +162,15 @@ jobs:
folder: doc/_build/html
clean: true
single-commit: true

- name: "Display Docker files structures"
if: always()
env:
MAPDL_INSTANCE: MAPDL_0
LOG_NAMES: logs-build-docs
run: |
.ci/display_logs.sh
- name: "Collect MAPDL logs on failure"
if: always()
env:
Expand All @@ -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
Expand Down

0 comments on commit f392b91

Please sign in to comment.