From bbf1e365ac832d12757bd810646c8ce0f2627885 Mon Sep 17 00:00:00 2001 From: Gabor Szarnyas Date: Thu, 20 Jul 2023 10:14:16 +0200 Subject: [PATCH] Add GitHub CI action to run linkchecker --- .github/linkchecker/linkchecker.conf | 8 ++++++ .github/workflows/linkchecker.yml | 31 ++++++++++++++++++++++ .github/workflows/lint.yml | 12 --------- report.html | 39 ++++++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 12 deletions(-) create mode 100644 .github/linkchecker/linkchecker.conf create mode 100644 .github/workflows/linkchecker.yml delete mode 100644 .github/workflows/lint.yml create mode 100644 report.html diff --git a/.github/linkchecker/linkchecker.conf b/.github/linkchecker/linkchecker.conf new file mode 100644 index 0000000..e0c7459 --- /dev/null +++ b/.github/linkchecker/linkchecker.conf @@ -0,0 +1,8 @@ +[output] +log=html + +[checking] +sslverify=0 + +[filtering] +checkextern=1 diff --git a/.github/workflows/linkchecker.yml b/.github/workflows/linkchecker.yml new file mode 100644 index 0000000..c15ef2b --- /dev/null +++ b/.github/workflows/linkchecker.yml @@ -0,0 +1,31 @@ +name: Check links in the README + +on: [push, pull_request] + +jobs: + LinkChecker: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: pandoc + + - name: Convert Markdown to HTML format + run: pandoc README.md --standalone --output README.html + + - name: Set up Python 3.9 + uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - run: pip install linkchecker --user + + - name: Link Checker + run: linkchecker README.html --config .github/linkchecker/linkchecker.conf --file-output html/utf-8/report.html + + - run: cat report.html >> ${GITHUB_STEP_SUMMARY} + if: success() || failure() diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index c27fecd..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: lint - -on: [push, pull_request] - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - run: npx awesome-lint diff --git a/report.html b/report.html new file mode 100644 index 0000000..ab7b59d --- /dev/null +++ b/report.html @@ -0,0 +1,39 @@ + + + + +LinkChecker 10.2.1 + + + +

LinkChecker 10.2.1


LinkChecker comes with ABSOLUTELY NO WARRANTY! +This is free software, and you are welcome to redistribute it under +certain conditions. Look at the file `LICENSE' within this distribution.

Start checking at 2023-07-20 10:35:59+002 +

Statistics
+No statistics available since no URLs were checked. +
+
+That's it. 0 links checked. 0 warnings found. 0 errors found. +
+Stopped checking at 2023-07-20 10:35:59+002 (0.00 seconds) +


LinkChecker 10.2.1, Copyright © 2000-2016 Bastian Kleineidam, 2010-2022 LinkChecker Authors
+Read the documentation at https://linkchecker.github.io/linkchecker/.
+Write comments and bugs to https://github.com/linkchecker/linkchecker/issues.
+