summaryrefslogtreecommitdiffstats
path: root/.github/workflows/spell-check.yml
blob: 5336074129129531d42943e0e3006217101401dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# A CI action that using codespell to check spell.
# .github/.codespellrc is a config file.
# .github/wordlist.txt is a list of words that will ignore word checks.
# More details please check the following link:
# https://github.com/codespell-project/codespell
name: Spellcheck

on:
  push:
  pull_request:

jobs:
  build:
    name: Spellcheck
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: pip cache
        uses: actions/cache@v3
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
          restore-keys: ${{ runner.os }}-pip-

      - name: Install prerequisites
        run: sudo pip install -r ./.codespell/requirements.txt

      - name: Spell check
        run: codespell --config=./.codespell/.codespellrc