2021-06-10 08:39:33 -04:00
|
|
|
# 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@v2
|
|
|
|
|
2022-01-04 09:19:28 -05:00
|
|
|
- name: pip cache
|
2022-03-30 09:16:21 -04:00
|
|
|
uses: actions/cache@v3
|
2022-01-04 09:19:28 -05:00
|
|
|
with:
|
|
|
|
path: ~/.cache/pip
|
|
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
|
|
restore-keys: ${{ runner.os }}-pip-
|
|
|
|
|
2021-06-10 08:39:33 -04:00
|
|
|
- name: Install prerequisites
|
2022-01-04 09:19:28 -05:00
|
|
|
run: sudo pip install -r ./.codespell/requirements.txt
|
2021-06-10 08:39:33 -04:00
|
|
|
|
|
|
|
- name: Spell check
|
2022-01-04 09:19:28 -05:00
|
|
|
run: codespell --config=./.codespell/.codespellrc
|