From 08ce4c32e72b28589a730cdd740a622762428cec Mon Sep 17 00:00:00 2001 From: richelbilderbeek Date: Wed, 28 Feb 2024 07:21:47 +0100 Subject: [PATCH] Fix CI --- .github/workflows/build_pdfs.yaml | 50 ++-------------------- .github/workflows/check_links.yaml | 24 +++++------ .github/workflows/check_spelling.yaml | 2 +- .github/workflows/lint_markdown.yaml | 2 +- .wordlist.txt | 60 +++------------------------ mlc_config.json | 7 +--- 6 files changed, 24 insertions(+), 121 deletions(-) diff --git a/.github/workflows/build_pdfs.yaml b/.github/workflows/build_pdfs.yaml index cf5b1ab..c238ea5 100644 --- a/.github/workflows/build_pdfs.yaml +++ b/.github/workflows/build_pdfs.yaml @@ -5,7 +5,7 @@ on: push: pull_request: schedule: - - cron: "0 0 16 * *" + - cron: "0 0 15 * *" jobs: @@ -18,64 +18,20 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@master - with: - python-version: '3.10' - - - name: Install Python and pip - run: python3 -m pip install jupyter - - uses: quarto-dev/quarto-actions/setup@v2 with: tinytex: true - # These will break the scripts - - name: Delete folders that have PDFs with spaces - run: rm -rf development_design - # These PDFs are there so that git does not check a PDF each change. # The idea is to put the PDFs created by GHA (i.e. this script) # there manually - name: Delete old PDFs run: rm $(find . | egrep "pdf$") - - uses: r-lib/actions/setup-r@v2 - - - name: Install R packages - run: install.packages(c("ggplot2", "reticulate", "rmarkdown", "testthat", "tidyr")) - shell: Rscript {0} - - uses: quarto-dev/quarto-actions/render@v2 with: to: pdf - path: algorithms/algorithms_lecture/algorithms_lecture.qmd - - - uses: quarto-dev/quarto-actions/render@v2 - with: - to: pdf - path: data_structures/data_structures_lecture/data_structures_lecture.qmd - - - uses: quarto-dev/quarto-actions/render@v2 - with: - to: pdf - path: optimisation/optimisation_lecture/optimisation_lecture.qmd - - - uses: quarto-dev/quarto-actions/render@v2 - with: - to: pdf - path: tdd/tdd_lecture/tdd_lecture.qmd - - - uses: quarto-dev/quarto-actions/render@v2 - with: - to: pdf - path: testing/testing_lecture/testing_lecture.qmd - - ############################################# - # Move all PDFs one folder up, for each copy - ############################################# - - name: Move all PDFs one folder up - run: ./scripts/move_pdfs_one_folder_up.sh + path: presentation.qmd ############################################# # Upload @@ -83,7 +39,7 @@ jobs: - name: Upload PDF to the workflow tab uses: actions/upload-artifact@v2 with: - name: all_presentations + name: zipped_presentation path: "**/*.pdf" if-no-files-found: error diff --git a/.github/workflows/check_links.yaml b/.github/workflows/check_links.yaml index 4db7de4..ec66036 100644 --- a/.github/workflows/check_links.yaml +++ b/.github/workflows/check_links.yaml @@ -1,27 +1,27 @@ -# Check if any links are broken -name: Check links - on: push: pull_request: schedule: - - cron: "0 0 16 * *" + - cron: "0 0 15 * *" +name: check-links jobs: - check_links: - + check-links: runs-on: ubuntu-latest env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - steps: - uses: actions/checkout@v2 - - name: Remove folders that do not care about broken links - run: | - rm -rf development_design + # If there is a valid external link that fails, + # add it to mlc_config.json + - name: External links must be checked, do not allow '0' in the 'aliveStatusCodes' of mlc_config.json + run: if [[ $(grep --regexp "[^0-9]0[^0-9]" mlc_config.json | wc --lines) == "1" ]]; then echo "FOUND"; exit 42; fi + + - name: Internal links must checked, do not allow '400' in the 'aliveStatusCodes' of mlc_config.json + run: if [[ $(grep --regexp "[^0-9]400[^0-9]" mlc_config.json | wc --lines) == "1" ]]; then echo "FOUND"; exit 42; fi - - uses: lycheeverse/lychee-action@v1.2.0 + - uses: gaurav-nelson/github-action-markdown-link-check@v1 with: - fail: true + config-file: 'mlc_config.json' diff --git a/.github/workflows/check_spelling.yaml b/.github/workflows/check_spelling.yaml index aad7a41..ff11eeb 100644 --- a/.github/workflows/check_spelling.yaml +++ b/.github/workflows/check_spelling.yaml @@ -5,7 +5,7 @@ on: push: pull_request: schedule: - - cron: "0 0 16 * *" + - cron: "0 0 15 * *" jobs: diff --git a/.github/workflows/lint_markdown.yaml b/.github/workflows/lint_markdown.yaml index 6a5a04d..b8405fb 100644 --- a/.github/workflows/lint_markdown.yaml +++ b/.github/workflows/lint_markdown.yaml @@ -5,7 +5,7 @@ on: push: pull_request: schedule: - - cron: "0 0 16 * *" + - cron: "0 0 15 * *" jobs: diff --git a/.wordlist.txt b/.wordlist.txt index bb332b0..0bb047b 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -1,55 +1,7 @@ -Awk -awk -config -faq -github -html -https -io -json -mlc -nl -Pavlin's -pmitev -richel +OSU +Richèl +Uppsala Richel -richelbilderbeek -sexualized -socio -txt -UPPMAX -wordlist -www -yml -bilderbeek -CLI -colour -CSVs -dataset -gat -kat -Korona -litres -MacOS -metacharacter -oneliner -personnummer -printf -regexlearn -regextester -repo -RSA -se -sed -uppmax -USD -uu -VVS -wc -wd -whitespace -qat -wat -addr - - +Arqus +ENLIGHT +enlight diff --git a/mlc_config.json b/mlc_config.json index 0ac1332..55f4869 100644 --- a/mlc_config.json +++ b/mlc_config.json @@ -1,8 +1,3 @@ { - "aliveStatusCodes": [200, 403, 418, 503], - "ignorePatterns": [ - { - "pattern": "^overview/$" - }, - ] + "aliveStatusCodes": [200, 403, 418, 503] }