Skip to content

update dependnecies. Swap mkdocs quiz to use upstream #2750

update dependnecies. Swap mkdocs quiz to use upstream

update dependnecies. Swap mkdocs quiz to use upstream #2750

Workflow file for this run

name: Checks
env:
MODULE_LIST_PATH: docs/assets/module-list.json
on:
push:
branches-ignore: [main]
repository_dispatch:
workflow_dispatch:
inputs:
fileList:
description: Files to Lint (space delimited). Use `docs/**/*.md` to lint all.
required: true
default: "docs/CONTRIBUTING.md"
type: string
checkSpelling:
description: Check Spelling
default: true
type: boolean
checkProse:
description: Check Prose
default: true
type: boolean
checkMarkdown:
description: Check Markdown
default: true
type: boolean
checkMeta:
description: Check Meta
default: true
type: boolean
checkSlurm:
description: Check Slurm
default: true
type: boolean
testBuild:
description: Test Build
default: true
type: boolean
jobs:
get:
name: Determine what files to check
runs-on: ubuntu-24.04
steps:
- name: Checkout Repo
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Push Changed files to output
if: inputs.fileList == ''
id: diff
run: |
changed_files="$(git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -E '^docs/.*\.md$' | tr '\n' ' ')"
echo "::info::Workflow triggered by PR"
echo "Changed files: '${changed_files}'"
echo "filelist=${changed_files}" >> $GITHUB_OUTPUT
outputs:
filelist: ${{steps.diff.outputs.filelist || inputs.fileList}}
spellcheck:
name: Check Spelling
if: ${{ github.event_name != 'workflow_dispatch' || inputs.checkSpelling }}
runs-on: ubuntu-24.04
needs: get
steps:
- if: ${{! needs.get.outputs.filelist}}
name: No files to spellcheck
run: exit 0
- if: ${{needs.get.outputs.filelist}}
name: Check out repo.
uses: actions/checkout@v6
- if: ${{needs.get.outputs.filelist}}
name: Install dependencies
run: |
sudo apt install -y aspell
pip3 install $(grep ^pyspelling requirements.txt)
pip3 install $(grep ^flashtext requirements.txt)
- if: ${{needs.get.outputs.filelist}}
name: Run pyspelling
run: |
shopt -s globstar extglob
python3 checks/run_spell_check.py ${{needs.get.outputs.filelist}}
proselint:
name: Check Prose
if: ${{github.event_name != 'workflow_dispatch'|| inputs.checkProse}}
runs-on: ubuntu-24.04
needs: get
steps:
- if: ${{! needs.get.outputs.filelist}}
name: No files to proselint
run: exit 0
- if: ${{needs.get.outputs.filelist}}
name: Check out repo.
uses: actions/checkout@v6
- if: ${{needs.get.outputs.filelist}}
name: Install dependencies
run: pip3 install $(grep ^proselint requirements.txt)
- if: ${{needs.get.outputs.filelist}}
name: Run proselint
run: |
shopt -s globstar extglob
python3 checks/run_proselint.py ${{needs.get.outputs.filelist}}
mdlint:
name: Check Markdown
if: ${{github.event_name != 'workflow_dispatch' || inputs.checkMarkdown}}
runs-on: ubuntu-24.04
needs: get
steps:
- if: ${{! needs.get.outputs.filelist}}
name: No files to check Markdown
run: exit 0
- if: ${{needs.get.outputs.filelist}}
name: Check out repo.
uses: actions/checkout@v6
- if: ${{needs.get.outputs.filelist}}
name: Install dependencies
run: npm install -g markdownlint-cli
- if: ${{needs.get.outputs.filelist}}
name: Run markdownlint
run: |
shopt -s globstar extglob
markdownlint --config .markdownlint.json --json ${{needs.get.outputs.filelist}} 2>&1 | python3 checks/parse_markdownlint.py
metacheck:
name: Check page meta
if: ${{github.event_name != 'workflow_dispatch'|| inputs.checkMeta}}
runs-on: ubuntu-24.04
needs: get
steps:
- if: ${{ ! needs.get.outputs.filelist}}
name: No files to check meta on.
run: exit 0
- if: ${{needs.get.outputs.filelist}}
name: Check out repo.
uses: actions/checkout@v6
- if: ${{needs.get.outputs.filelist}}
name: Check markdown meta.
run: |
pip3 install titlecase
shopt -s globstar extglob
python3 checks/run_meta_check.py ${{needs.get.outputs.filelist}}
slurmcheck:
name: Check slurm scripts
if: ${{github.event_name != 'workflow_dispatch'|| inputs.checkSlurm}}
runs-on: ubuntu-24.04
needs: get
steps:
- if: ${{ ! needs.get.outputs.filelist}}
name: No files to check meta on.
run: exit 0
- if: ${{needs.get.outputs.filelist}}
name: Check out repo.
uses: actions/checkout@v6
- if: ${{needs.get.outputs.filelist}}
name: Check markdown meta.
run: |
shopt -s globstar extglob
python3 checks/run_slurm_lint.py ${{needs.get.outputs.filelist}}
testBuild:
name: Test build
if: ${{github.event_name != 'workflow_dispatch' || inputs.testBuild}}
runs-on: ubuntu-24.04
needs: get
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- run: pip3 install -r requirements.txt
- run: ./checks/run_test_build.py