Skip to content

Run typos with a GitHub action on PRs #1770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 17, 2024
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
8 changes: 5 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests

name: Content tests
name: Content and unit tests

on:
push:
Expand All @@ -13,11 +13,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'

- run: npm ci
- run: npm test
19 changes: 19 additions & 0 deletions .github/workflows/typos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Content typos tests

on:
push:
branches: ['main']
pull_request:
branches: ['main']

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Check spelling in content directory
uses: crate-ci/typos@master
with:
files: ./content
2 changes: 1 addition & 1 deletion content/videos/archive/ml5/1-finding-keypoints/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"icon": "📓",
"title": "Humans of AI",
"url": "https://humans-of.ai/editorial/",
"description": "Philipp Schmitt's editorial essay on artifial intelligence and the human effort that went into creating the training dataset."
"description": "Philipp Schmitt's editorial essay on artificial intelligence and the human effort that went into creating the training dataset."
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"codeExamples": [
{
"title": "Polynomial Regression",
"description": "This sketch creates an interactive simulation of polynominal regression.",
"description": "This sketch creates an interactive simulation of polynomial regression.",
"urls": { "p5": "https://editor.p5js.org/codingtrain/sketches/UdXRZxF7e" }
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
},
{
"icon": "🔗",
"title": "The 'procesing-java' command",
"title": "The 'processing-java' command",
"url": "https://github.com/processing/processing/wiki/Command-Line",
"description": "Running Processing sketches from the command line"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{ "time": "16:44", "title": "Add the formulas" },
{ "time": "21:25", "title": "Simplify the code" },
{ "time": "22:57", "title": "Check for overlap" },
{ "time": "24:31", "title": "Check the particle's kinetic enery" },
{ "time": "24:31", "title": "Check the particle's kinetic energy" },
{ "time": "25:48", "title": "Fix error" },
{ "time": "27:30", "title": "Add more particles" },
{ "time": "30:11", "title": "Optimizations" },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "Catch The Sheeps (Game Concept)",
"title": "Catch The Sheep (Game Concept)",
"author": {
"name": "Leonardo M. Louzas",
"url": "https://github.com/leonardomlouzas"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"icon": "💻",
"title": "Humans of AI (Editorial Essay)",
"url": "https://humans-of.ai/editorial/",
"description": "Philipp Schmitt's editorial essay on artifial intelligence and the human effort that went into creating the training dataset."
"description": "Philipp Schmitt's editorial essay on artificial intelligence and the human effort that went into creating the training dataset."
},
{
"icon": "💻",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
{
"time": "8:18",
"title": "Euler integraton"
"title": "Euler integration"
},
{
"time": "10:03",
Expand Down
10 changes: 10 additions & 0 deletions typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[default]
extend-ignore-re = [
# don't spellcheck the values of these JSON keys
'"(name|videoId|url|instagram)": ".*"',

# false positives
'Jason Sigal',
'Thi\.ng',
'Shure Lavalier',
]