From 71c8db120c633e6249c72acdd06de831b367b434 Mon Sep 17 00:00:00 2001 From: Torsten Kilias Date: Wed, 31 Jan 2024 18:26:24 +0100 Subject: [PATCH] #157: Added link checker for the documentation (#158) --- .../workflows/check_documentation_links.yaml | 23 +++++++++++++++++++ doc/changes/changes_0.1.0.md | 1 + doc/developer_guide/notebooks.md | 6 ++--- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/check_documentation_links.yaml diff --git a/.github/workflows/check_documentation_links.yaml b/.github/workflows/check_documentation_links.yaml new file mode 100644 index 00000000..b7d33cbe --- /dev/null +++ b/.github/workflows/check_documentation_links.yaml @@ -0,0 +1,23 @@ +name: Check Documentation Links + +on: + push: + branches-ignore: + - "main" + +jobs: + check_documentation_links: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Link Checker + id: lychee + uses: lycheeverse/lychee-action@v1.9.0 + with: + fail: true + args: --verbose --no-progress 'doc/**/*.md' 'README.md' + diff --git a/doc/changes/changes_0.1.0.md b/doc/changes/changes_0.1.0.md index 273ed55e..2e4ead15 100644 --- a/doc/changes/changes_0.1.0.md +++ b/doc/changes/changes_0.1.0.md @@ -35,6 +35,7 @@ Version: 0.1.0 * #145: Added Docker Test Library to prepare Notebook tests * #151: Setup SageMaker Credentials for notebook testing in the CI * #155: Added a Notebook Link Checker to Github Actions +* #157: Added link checker for the documentation ## Bug Fixes diff --git a/doc/developer_guide/notebooks.md b/doc/developer_guide/notebooks.md index d11b3523..b71ed8a9 100644 --- a/doc/developer_guide/notebooks.md +++ b/doc/developer_guide/notebooks.md @@ -7,12 +7,12 @@ Please add or update the notebook files in folder [exasol/ds/sandbox/runtime/ans ## Notebook Testing We are running tests for the notebooks in the Docker Edition of the AI Lab. For this we are creating a Docker test setup in -[test_notebooks_in_dss_docker_image.py](test/integration/test_notebooks_in_dss_docker_image.py) which installs test libraries into the AI Lab Docker Image. -It further creates a new test and Docker Container for each notebook test in [test/notebooks](test/notebooks). +[test_notebooks_in_dss_docker_image.py](../../test/notebook_test_runner/test_notebooks_in_dss_docker_image.py) which installs test libraries into the AI Lab Docker Image. +It further creates a new test and Docker Container for each notebook test in [test/notebooks](../../test/notebooks). Notebook test names need to fit the pattern `nbtest_*.py`, to prevent pytest running them outside of Docker setup. Environment variables with the prefix `NBTEST_` with which you call -[test_notebooks_in_dss_docker_image.py](test/integration/test_notebooks_in_dss_docker_image.py) are forwarded +[test_notebooks_in_dss_docker_image.py](../../test/notebook_test_runner/test_notebooks_in_dss_docker_image.py) are forwarded into the Docker container and to the notebook test. You can use this to forward secrets to the notebook tests. By default all created containers and images are removed after running the tests regardless of success or failure.