Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
richelbilderbeek committed Feb 28, 2024
1 parent d9a63db commit 08ce4c3
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 121 deletions.
50 changes: 3 additions & 47 deletions .github/workflows/build_pdfs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
pull_request:
schedule:
- cron: "0 0 16 * *"
- cron: "0 0 15 * *"


jobs:
Expand All @@ -18,72 +18,28 @@ 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
#############################################
- 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

24 changes: 12 additions & 12 deletions .github/workflows/check_links.yaml
Original file line number Diff line number Diff line change
@@ -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'
2 changes: 1 addition & 1 deletion .github/workflows/check_spelling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
pull_request:
schedule:
- cron: "0 0 16 * *"
- cron: "0 0 15 * *"


jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint_markdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
pull_request:
schedule:
- cron: "0 0 16 * *"
- cron: "0 0 15 * *"


jobs:
Expand Down
60 changes: 6 additions & 54 deletions .wordlist.txt
Original file line number Diff line number Diff line change
@@ -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
7 changes: 1 addition & 6 deletions mlc_config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"aliveStatusCodes": [200, 403, 418, 503],
"ignorePatterns": [
{
"pattern": "^overview/$"
},
]
"aliveStatusCodes": [200, 403, 418, 503]
}

0 comments on commit 08ce4c3

Please sign in to comment.