Skip to content

Commit

Permalink
chore: add a typo check to PRs (#3509)
Browse files Browse the repository at this point in the history
  • Loading branch information
SiTaggart authored Oct 13, 2023
1 parent 3b350c7 commit d174f24
Showing 1 changed file with 19 additions and 31 deletions.
50 changes: 19 additions & 31 deletions .github/workflows/on_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -445,37 +445,6 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 20.5
uses: actions/setup-node@v3
with:
node-version: 20.5.x

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- name: Load Yarn cache
uses: actions/cache@v3
id: yarn_cache_id
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn
- name: Node modules cache
uses: actions/cache@v3
id: node_modules_cache_id
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install Dependencies
if: steps.yarn_cache_id.outputs.cache-hit != 'true' || steps.node_modules_cache_id.outputs.cache-hit != 'true'
run: yarn install --immutable

- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
Expand Down Expand Up @@ -523,3 +492,22 @@ jobs:
run: yarn danger ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

typos:
name: Typos checks
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Check for typos
uses: reviewdog/action-misspell@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
locale: "US"
reporter: github-pr-review
level: error
pattern: |
*.md
*.mdx
**/type-docs.json

0 comments on commit d174f24

Please sign in to comment.