LinkCheck - All files π #56
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: LinkCheck - All files π | |
on: | |
schedule: | |
- cron: "0 5 * * 0" # Runs at 05:00 on Sunday. | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
ON_CI: True | |
MAPDL_PACKAGE: ghcr.io/ansys/mapdl | |
MAPDL_IMAGE_VERSION_DOCS_BUILD: v24.1.0 | |
MAIN_PYTHON_VERSION: '3.10' | |
PYANSYS_OFF_SCREEN: True | |
DPF_START_SERVER: False | |
DPF_PORT: 21002 | |
jobs: | |
linkchecker: | |
name: Check Links | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
env: | |
PYMAPDL_PORT: 21000 # default won't work on GitHub runners | |
PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners | |
PYMAPDL_START_INSTANCE: FALSE | |
ON_DOCUMENTATION: TRUE | |
SHELLOPTS: "errexit:pipefail" | |
steps: | |
- name: "Install Git and checkout project" | |
uses: actions/checkout@v4 | |
- name: "Login in Github container registry" | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ secrets.GH_USERNAME }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: "DPF server activation" | |
run: | | |
$(docker pull ghcr.io/ansys/dpf-core:22.2dev && docker run -d --name dpfserver -p ${{ env.DPF_PORT }}:50052 ghcr.io/ansys/dpf-core:22.2dev && echo "DPF Server active on port ${{ env.DPF_PORT }}.") & | |
- name: "Pull, launch, and validate MAPDL service" | |
id: start_mapdl | |
env: | |
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} | |
MAPDL_VERSION: ${{ env.MAPDL_IMAGE_VERSION_DOCS_BUILD }} | |
DISTRIBUTED_MODE: "dmp" | |
run: | | |
export INSTANCE_NAME=MAPDL | |
.ci/start_mapdl.sh &> mapdl_launch.log & export DOCKER_PID=$! | |
echo "Launching MAPDL service at PID: $DOCKER_PID" | |
echo "DOCKER_PID=$(echo $DOCKER_PID)" >> $GITHUB_OUTPUT | |
- name: "Setup Python" | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
- name: "Install OS packages" | |
run: | | |
sudo apt update | |
sudo apt install zip pandoc libgl1-mesa-glx xvfb texlive-latex-extra latexmk graphviz | |
- name: "Test virtual framebuffer" | |
run: | | |
pip install -r .ci/requirements_test_xvfb.txt | |
xvfb-run python .ci/display_test.py | |
- name: "Install ansys-mapdl-core" | |
run: | | |
pip install . | |
xvfb-run python -c "from ansys.mapdl import core as pymapdl; print(pymapdl.Report())" | |
- name: "Retrieve PyMAPDL version" | |
id: version | |
run: | | |
echo "PYMAPDL_VERSION=$(python -c 'from ansys.mapdl.core import __version__; print(__version__)')" >> $GITHUB_OUTPUT | |
echo "PyMAPDL version is: $(python -c "from ansys.mapdl.core import __version__; print(__version__)")" | |
- name: "Install docs build requirements" | |
run: | | |
pip install .[doc] | |
- name: "Waiting for the services to be up" | |
run: | | |
.ci/waiting_services.sh | |
- name: LinkCheck | |
run: | | |
xvfb-run make -C doc linkcheck SPHINXOPTS="-j auto -W --keep-going" | |
- name: "Display linkchecker results" | |
if: always() | |
run: | | |
echo "::group:: Display linkcher output" && cat doc/*/output.txt && echo "::endgroup::" || echo "Failed to display the output file." | |
- name: "Upload HTML Documentation" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: documentation-html | |
path: doc/_build/html | |
retention-days: 7 | |
- name: "Upload artifacts" | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: output | |
path: doc/**/output.txt | |
retention-days: 30 |