diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 828264672..b6a57374b 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -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: @@ -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 diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml new file mode 100644 index 000000000..dc1f6d2e6 --- /dev/null +++ b/.github/workflows/typos.yml @@ -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 diff --git a/content/videos/archive/ml5/1-finding-keypoints/index.json b/content/videos/archive/ml5/1-finding-keypoints/index.json index 7d71d7016..7ca5360f2 100644 --- a/content/videos/archive/ml5/1-finding-keypoints/index.json +++ b/content/videos/archive/ml5/1-finding-keypoints/index.json @@ -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." } ] }, diff --git a/content/videos/challenges/105-polynomial-regression-with-tensorflowjs/index.json b/content/videos/challenges/105-polynomial-regression-with-tensorflowjs/index.json index f83c1fe04..e26471705 100644 --- a/content/videos/challenges/105-polynomial-regression-with-tensorflowjs/index.json +++ b/content/videos/challenges/105-polynomial-regression-with-tensorflowjs/index.json @@ -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" } } ], diff --git a/content/videos/challenges/118-mastodon-fractal-tree-bot/index.json b/content/videos/challenges/118-mastodon-fractal-tree-bot/index.json index 74d72d419..a9ce6de3d 100644 --- a/content/videos/challenges/118-mastodon-fractal-tree-bot/index.json +++ b/content/videos/challenges/118-mastodon-fractal-tree-bot/index.json @@ -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" } diff --git a/content/videos/challenges/184-elastic-collisions/index.json b/content/videos/challenges/184-elastic-collisions/index.json index f7fa27a0b..08e59035a 100644 --- a/content/videos/challenges/184-elastic-collisions/index.json +++ b/content/videos/challenges/184-elastic-collisions/index.json @@ -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" }, diff --git a/content/videos/code/7-arrays/4-mouse-interaction/showcase/contribution-1724284721.json b/content/videos/code/7-arrays/4-mouse-interaction/showcase/contribution-1724284721.json index 8847d9dca..c02375259 100644 --- a/content/videos/code/7-arrays/4-mouse-interaction/showcase/contribution-1724284721.json +++ b/content/videos/code/7-arrays/4-mouse-interaction/showcase/contribution-1724284721.json @@ -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" diff --git a/content/videos/ml5/1-classification/3-object-detection/index.json b/content/videos/ml5/1-classification/3-object-detection/index.json index ed5470b8b..b14d94cf7 100644 --- a/content/videos/ml5/1-classification/3-object-detection/index.json +++ b/content/videos/ml5/1-classification/3-object-detection/index.json @@ -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": "💻", diff --git a/content/videos/physics-libraries/toxiclibs/1-introduction/index.json b/content/videos/physics-libraries/toxiclibs/1-introduction/index.json index e00c48e01..f8db67336 100644 --- a/content/videos/physics-libraries/toxiclibs/1-introduction/index.json +++ b/content/videos/physics-libraries/toxiclibs/1-introduction/index.json @@ -26,7 +26,7 @@ }, { "time": "8:18", - "title": "Euler integraton" + "title": "Euler integration" }, { "time": "10:03", diff --git a/typos.toml b/typos.toml new file mode 100644 index 000000000..956b19c58 --- /dev/null +++ b/typos.toml @@ -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', +]