Skip to content

Commit

Permalink
Add codespell workflow (#2807)
Browse files Browse the repository at this point in the history
* codespell workflow

* use micromamba

* Update env name

* Checkout PR's code when event is pull request target

* Update codespell configuration

* update codespell command to run in docs only

* Remove codespell version while installation

* Remove unwanted warnings from the logs

* Run codespell manually
  • Loading branch information
KasukabeDefenceForce committed Aug 30, 2024
1 parent b79b61e commit be4ec9a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -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/
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,8 @@ sort_commits = "newest"

[tool.git-cliff.remote.github]
owner = "tardis-sn"
repo = "tardis"
repo = "tardis"

[tool.codespell]
skip = "*.png,*.ggb,*.jpg,*.gif,*.ico,docs/contributing/CHANGELOG.md,docs/tardis.bib"
quiet-level = 3

0 comments on commit be4ec9a

Please sign in to comment.