[CI] Run checks over PRs (#235)

Signed-off-by: Patrice Chalin <pchalin@gmail.com>
This commit is contained in:
Patrice Chalin 2024-05-27 17:49:20 -04:00 committed by GitHub
parent 5d6363e6c5
commit 904b891970
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 64 additions and 2 deletions

View File

@ -3,8 +3,10 @@
# https://www.streetsidesoftware.com/vscode-spell-checker/docs/configuration/
version: '0.2'
caseSensitive: true
# ignorePaths:
# - '*.svg'
ignorePaths:
# Temporary until https://github.com/cncf/techdocs/pull/229 is merged
- /docs/
- /assessments/
# patterns:
# - name: CodeBlock
# pattern: |

18
.github/workflows/format-check.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: Format checks
on:
pull_request:
jobs:
format-check:
name: FILE FORMAT
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Check file format
run: npm run check:format

18
.github/workflows/link-check.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: Link checks
on:
pull_request:
jobs:
link-check:
name: LINK checking
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Check file format
run: npm run check:links

18
.github/workflows/spell-check.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: Spelling checks
on:
pull_request:
jobs:
spelling-check:
name: SPELLING check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Check file format
run: npm run check:spelling

1
.nvmrc Normal file
View File

@ -0,0 +1 @@
lts/*

View File

@ -2,5 +2,7 @@
# temporary
# Until https://github.com/cncf/techdocs/pull/229 is merged
assessments
docs
/README.md

View File

@ -5,6 +5,8 @@
"scripts": {
"_check:format:any": "npx prettier --check --ignore-path ''",
"_check:format": "npx prettier --check .",
"_list:check:*": "npm run --loglevel=warn | grep -Ee '^\\s*check:[^:]+$'",
"_list:fix:*": "npm run --loglevel=warn | grep -Ee '^\\s*fix:[^:]+$' | grep -v 'fix:all'",
"check:format": "npm run _check:format || (echo '[help] Run: npm run fix:format'; exit 1)",
"check:links": "npx markdown-link-check --config .markdown-link-check.json *.md",
"check:spelling": "npx cspell --no-progress -c .cspell.yml .",
@ -22,6 +24,7 @@
"prettier": "^3.2.5"
},
"private": true,
"spelling": "cSpell:ignore loglevel -",
"prettier": {
"proseWrap": "always",
"singleQuote": true