diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000000..df9c8a21898 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,39 @@ +name: codespell + +on: + push: + branches: + - master + workflow_dispatch: + pull_request_target: + branches: + - master + +jobs: + codespell: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + if: github.event_name != 'pull_request_target' + + - name: Checkout pull/${{ github.event.number }} + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + if: github.event_name == 'pull_request_target' + + - name: Setup micromamba + uses: mamba-org/setup-micromamba@v1 + with: + environment-name: fetch-env + create-args: >- + python + + - name: Install Codespell + run: pip install codespell + + - name: Run codespell + run: | + codespell docs/ \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index aa2774b32ba..2f6fafb230b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -214,4 +214,8 @@ sort_commits = "newest" [tool.git-cliff.remote.github] owner = "tardis-sn" -repo = "tardis" \ No newline at end of file +repo = "tardis" + +[tool.codespell] +skip = "*.png,*.ggb,*.jpg,*.gif,*.ico,docs/contributing/CHANGELOG.md,docs/tardis.bib" +quiet-level = 3 \ No newline at end of file