From de31a06a4a8a87e9f3b7db7b1201aaee6b422cbe Mon Sep 17 00:00:00 2001 From: Rinne Date: Mon, 29 Apr 2024 18:07:13 +0800 Subject: [PATCH] ci: add workflow to check the spelling. --- .github/_typos.toml | 14 ++++++++++++++ .github/workflows/spell_check.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/_typos.toml create mode 100644 .github/workflows/spell_check.yml diff --git a/.github/_typos.toml b/.github/_typos.toml new file mode 100644 index 00000000..874ad82a --- /dev/null +++ b/.github/_typos.toml @@ -0,0 +1,14 @@ +# Typos configuration file +# +# Info: https://github.com/marketplace/actions/typos-action +# Install: brew install typos-cli +# Install: conda install typos +# Run: typos -c .github/_typos.toml + +[files] +extend-exclude = [ + "_typos.toml", + "docs/xmldocs/", + "LLama.Web/wwwroot/", + "LLama/runtimes/deps/" +] diff --git a/.github/workflows/spell_check.yml b/.github/workflows/spell_check.yml new file mode 100644 index 00000000..b6fab829 --- /dev/null +++ b/.github/workflows/spell_check.yml @@ -0,0 +1,31 @@ +# Check pull requests for typos. +# +# Configuration: .github/_typos.toml +# +# Info: https://github.com/marketplace/actions/typos-action +# Local install: brew install typos-cli +# Local install: conda install typos +# Local run: typos -c .github/_typos.toml + +name: Spell Check + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + run: + name: Spell check + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + + - name: Use custom config file + uses: crate-ci/typos@master + with: + config: .github/_typos.toml + write_changes: false + quiet: true \ No newline at end of file