Skip to content

Commit

Permalink
add codespell check to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rlsu9 committed Dec 31, 2024
1 parent 8627945 commit 0981180
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: codespell

on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
paths:
- "**/*.py"
- "**/*.md"
- "**/*.rst"
- pyproject.toml
- requirements-lint.txt
- .github/workflows/codespell.yml
pull_request:
branches:
- main
paths:
- "**/*.py"
- "**/*.md"
- "**/*.rst"
- pyproject.toml
- requirements-lint.txt
- .github/workflows/codespell.yml

jobs:
codespell:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12' # or any version you need
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-lint.txt
- name: Spelling check with codespell
env:
# Put all your --skip arguments in a single variable
CODESPELL_EXCLUDES: >
--skip "data/**"
--skip "fastvideo/distill.py"
--skip "fastvideo/models/hunyuan/modules/models.py"
--skip "fastvideo/models/mochi_hf/modeling_mochi.py"
--skip "fastvideo/utils/env_utils.py"
run: |
# Refer to the above environment variable here
codespell --toml pyproject.toml $CODESPELL_EXCLUDES

0 comments on commit 0981180

Please sign in to comment.