Skip to content

Commit e70b99f

Browse files
authored
Run typos with a GitHub action on PRs (#1770)
* update checkout and setup-node GH actions to v4 * add `typos` GH action + config * remove glob matcher in `typos` action * fix detected typos
1 parent d91ec5e commit e70b99f

File tree

10 files changed

+41
-10
lines changed

10 files changed

+41
-10
lines changed

.github/workflows/node.js.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests
22

3-
name: Content tests
3+
name: Content and unit tests
44

55
on:
66
push:
@@ -13,11 +13,13 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
17+
1718
- name: Use Node.js ${{ matrix.node-version }}
18-
uses: actions/setup-node@v3
19+
uses: actions/setup-node@v4
1920
with:
2021
node-version: '20.x'
2122
cache: 'npm'
23+
2224
- run: npm ci
2325
- run: npm test

.github/workflows/typos.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Content typos tests
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
pull_request:
7+
branches: ['main']
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Check spelling in content directory
17+
uses: crate-ci/typos@master
18+
with:
19+
files: ./content

content/videos/archive/ml5/1-finding-keypoints/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"icon": "📓",
7777
"title": "Humans of AI",
7878
"url": "https://humans-of.ai/editorial/",
79-
"description": "Philipp Schmitt's editorial essay on artifial intelligence and the human effort that went into creating the training dataset."
79+
"description": "Philipp Schmitt's editorial essay on artificial intelligence and the human effort that went into creating the training dataset."
8080
}
8181
]
8282
},

content/videos/challenges/105-polynomial-regression-with-tensorflowjs/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"codeExamples": [
2525
{
2626
"title": "Polynomial Regression",
27-
"description": "This sketch creates an interactive simulation of polynominal regression.",
27+
"description": "This sketch creates an interactive simulation of polynomial regression.",
2828
"urls": { "p5": "https://editor.p5js.org/codingtrain/sketches/UdXRZxF7e" }
2929
}
3030
],

content/videos/challenges/118-mastodon-fractal-tree-bot/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
},
9191
{
9292
"icon": "🔗",
93-
"title": "The 'procesing-java' command",
93+
"title": "The 'processing-java' command",
9494
"url": "https://github.com/processing/processing/wiki/Command-Line",
9595
"description": "Running Processing sketches from the command line"
9696
}

content/videos/challenges/184-elastic-collisions/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{ "time": "16:44", "title": "Add the formulas" },
2222
{ "time": "21:25", "title": "Simplify the code" },
2323
{ "time": "22:57", "title": "Check for overlap" },
24-
{ "time": "24:31", "title": "Check the particle's kinetic enery" },
24+
{ "time": "24:31", "title": "Check the particle's kinetic energy" },
2525
{ "time": "25:48", "title": "Fix error" },
2626
{ "time": "27:30", "title": "Add more particles" },
2727
{ "time": "30:11", "title": "Optimizations" },

content/videos/code/7-arrays/4-mouse-interaction/showcase/contribution-1724284721.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"title": "Catch The Sheeps (Game Concept)",
2+
"title": "Catch The Sheep (Game Concept)",
33
"author": {
44
"name": "Leonardo M. Louzas",
55
"url": "https://github.com/leonardomlouzas"

content/videos/ml5/1-classification/3-object-detection/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"icon": "💻",
7878
"title": "Humans of AI (Editorial Essay)",
7979
"url": "https://humans-of.ai/editorial/",
80-
"description": "Philipp Schmitt's editorial essay on artifial intelligence and the human effort that went into creating the training dataset."
80+
"description": "Philipp Schmitt's editorial essay on artificial intelligence and the human effort that went into creating the training dataset."
8181
},
8282
{
8383
"icon": "💻",

content/videos/physics-libraries/toxiclibs/1-introduction/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
{
2828
"time": "8:18",
29-
"title": "Euler integraton"
29+
"title": "Euler integration"
3030
},
3131
{
3232
"time": "10:03",

typos.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[default]
2+
extend-ignore-re = [
3+
# don't spellcheck the values of these JSON keys
4+
'"(name|videoId|url|instagram)": ".*"',
5+
6+
# false positives
7+
'Jason Sigal',
8+
'Thi\.ng',
9+
'Shure Lavalier',
10+
]

0 commit comments

Comments
 (0)