46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
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
|
|
run: |
|
|
# Refer to the above environment variable here
|
|
codespell --toml pyproject.toml $CODESPELL_EXCLUDES
|