mirror of https://github.com/cncf/techdocs.git
[CI] Run checks over PRs (#235)
Signed-off-by: Patrice Chalin <pchalin@gmail.com>
This commit is contained in:
parent
5d6363e6c5
commit
904b891970
|
|
@ -3,8 +3,10 @@
|
||||||
# https://www.streetsidesoftware.com/vscode-spell-checker/docs/configuration/
|
# https://www.streetsidesoftware.com/vscode-spell-checker/docs/configuration/
|
||||||
version: '0.2'
|
version: '0.2'
|
||||||
caseSensitive: true
|
caseSensitive: true
|
||||||
# ignorePaths:
|
ignorePaths:
|
||||||
# - '*.svg'
|
# Temporary until https://github.com/cncf/techdocs/pull/229 is merged
|
||||||
|
- /docs/
|
||||||
|
- /assessments/
|
||||||
# patterns:
|
# patterns:
|
||||||
# - name: CodeBlock
|
# - name: CodeBlock
|
||||||
# pattern: |
|
# pattern: |
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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
|
||||||
|
|
@ -2,5 +2,7 @@
|
||||||
|
|
||||||
# temporary
|
# temporary
|
||||||
|
|
||||||
|
# Until https://github.com/cncf/techdocs/pull/229 is merged
|
||||||
assessments
|
assessments
|
||||||
docs
|
docs
|
||||||
|
/README.md
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"_check:format:any": "npx prettier --check --ignore-path ''",
|
"_check:format:any": "npx prettier --check --ignore-path ''",
|
||||||
"_check:format": "npx prettier --check .",
|
"_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: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:links": "npx markdown-link-check --config .markdown-link-check.json *.md",
|
||||||
"check:spelling": "npx cspell --no-progress -c .cspell.yml .",
|
"check:spelling": "npx cspell --no-progress -c .cspell.yml .",
|
||||||
|
|
@ -22,6 +24,7 @@
|
||||||
"prettier": "^3.2.5"
|
"prettier": "^3.2.5"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"spelling": "cSpell:ignore loglevel -",
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"proseWrap": "always",
|
"proseWrap": "always",
|
||||||
"singleQuote": true
|
"singleQuote": true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue