Skip to content

Commit

Permalink
[CI] Run checks over PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed May 14, 2024
1 parent c96c55f commit ff266c6
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
# https://www.streetsidesoftware.com/vscode-spell-checker/docs/configuration/
version: '0.2'
caseSensitive: true
# ignorePaths:
ignorePaths:
# Temporary until https://github.com/cncf/techdocs/pull/229 is merged
- /docs/
- /assessments/
# - '*.svg'
# patterns:
# - name: CodeBlock
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 18 additions & 0 deletions .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 18 additions & 0 deletions .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@

# temporary

# Until https://github.com/cncf/techdocs/pull/229 is merged
assessments
docs
/README.md
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 .",
Expand All @@ -22,6 +24,7 @@
"prettier": "^3.2.5"
},
"private": true,
"spelling": "cSpell:ignore loglevel -",
"prettier": {
"proseWrap": "always",
"singleQuote": true
Expand Down

0 comments on commit ff266c6

Please sign in to comment.