Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Continuous integration and start lesson plan #5

Merged
merged 28 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/check_links.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
on:
push:
pull_request:
schedule:
- cron: "0 0 12 * *"

name: check-links

jobs:
check-links:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- name: Remove lines with false positives
run: |
sed -i 's/.*check_links.yaml.*//g' README.md
sed -i 's/.*check_spelling.yaml.*//g' README.md

# 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: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: 'mlc_config.json'
28 changes: 28 additions & 0 deletions .github/workflows/check_spelling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Check that there is correct spelling in all files
name: Check spelling

on:
push:
pull_request:
schedule:
- cron: "0 0 16 * *"


jobs:
check_spelling:

runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:

- name: Set up Git repository
uses: actions/checkout@v2

- name: Remove folders that do not care about spelling
run: |
rm -rf development_design
rm -rf projects
rm -rf feedback

- uses: igsekor/pyspelling-any@v0.0.2
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,15 @@ jobs:
with:
python-version: 3.x
- run: pip install mkdocs-material

# If this fails with:
#
# remote: Permission to richelbilderbeek/to-awk-or-not.git denied to github-actions[bot].
#
# (or a later, less usefull error message:)
#
# subprocess.CalledProcessError: Command '['git', 'push', 'origin', 'gh-pages', '--force']' returned non-zero exit status 128
#
# See the answer at https://stackoverflow.com/a/75175628/3364162
- run: mkdocs gh-deploy --force

45 changes: 45 additions & 0 deletions .spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
matrix:
- name: markdown
dictionary:
wordlists:
- .wordlist.txt
output: wordlist.dic
encoding: utf-8
pipeline:
- pyspelling.filters.markdown:
markdown_extensions:
- markdown.extensions.extra:
- pyspelling.filters.html:
comments: false
attributes:
- alt
ignores:
- ':matches(code, pre)'
- 'code'
- 'pre'
- 'blockquote'
sources:
- '**/*.md'
default_encoding: utf-8
- name: Quarto markdown
dictionary:
wordlists:
- .wordlist.txt
output: wordlist.dic
encoding: utf-8
pipeline:
- pyspelling.filters.markdown:
markdown_extensions:
- markdown.extensions.extra:
- pyspelling.filters.html:
comments: false
attributes:
- alt
ignores:
- ':matches(code, pre)'
- 'code'
- 'pre'
- 'blockquote'
sources:
- '**/*.md'
default_encoding: utf-8
Loading
Loading