Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
40 changes: 30 additions & 10 deletions .github/workflows/cspell.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🧙 Check spell
name: Spell check

on:
pull_request:
Expand All @@ -8,15 +8,35 @@ on:
jobs:
spellcheck:
runs-on: ubuntu-latest
name: 🔍 spellcheck
steps:
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
- uses: streetsidesoftware/cspell-action@72ae91e90fa38f2335a60e233a847a6d00a9f221

- name: Setup Node
uses: ./.github/actions/composite/setupNode

- name: Restore cspell cache
# v4
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
with:
files: "**/*"
root: "."
config: "./cspell.json"
inline: error
strict: true
use_cspell_files: false
incremental_files_only: true
path: .cspellcache
key: cspell-${{ runner.os }}-${{ hashFiles('cspell.json') }}
restore-keys: |
cspell-${{ runner.os }}-

- name: Get changed files
id: changed-files
env:
GH_TOKEN: ${{ github.token }}
run: |
FILES=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files --jq '.[].filename' | tr '\n' ' ')
echo "files=$FILES" >> "$GITHUB_OUTPUT"

- name: Filter out dot files
id: filtered-files
run: |
FILES=$(echo "${{ steps.changed-files.outputs.files }}" | tr ' ' '\n' | grep -v '^\.' | tr '\n' ' ')
echo "files=$FILES" >> "$GITHUB_OUTPUT"

- name: Spell check
if: steps.filtered-files.outputs.files != ''
run: npm run spell-changed -- ${{ steps.filtered-files.outputs.files }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,6 @@ modules/*/lib/

# Claude local settings
.claude/settings.local.json

# cspell cache
.cspellcache
5 changes: 5 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"language": "en",
"enableGlobDot": false,
"cache": {
"useCache": true,
"cacheLocation": ".cspellcache"
},
"words": [
"--longpress",
"Accelo",
Expand Down
Loading
Loading