Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add codespell gh workflow #2625

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/codespell-ignored-words
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ot
te
raison
fo
lits

29 changes: 29 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Codespell

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
with:
skip: "./docs/build,./.git,*.txt"
ignore_words_file: .github/codespell-ignored-words
2 changes: 1 addition & 1 deletion .github/workflows/pythonbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ jobs:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements files
key: ${{ format('{0}-pip-{1}', runner.os, hashFiles('dev-requirements.txt', format('plugins/{0}/requirements.txt', matrix.plugin-names ))) }}
key: ${{ format('{0}-pip-{1}', runner.os, hashFiles('dev-requirements.in', format('plugins/{0}/requirements.txt', matrix.plugin-names ))) }}
- name: Install dependencies
run: |
pip install uv
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ lint: ## Run linters

.PHONY: spellcheck
spellcheck: ## Runs a spellchecker over all code and documentation
# Configuration is in pyproject.toml
codespell
# This pressuposes that you have act installed
act pull_request -W .github/workflows/codespell.yml

.PHONY: test
test: lint unit_test
Expand Down
1 change: 0 additions & 1 deletion dev-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pytest-mock
pytest-xdist
mypy<1.7.0
pre-commit
codespell
google-cloud-bigquery
google-cloud-bigquery-storage
IPython
Expand Down
Loading
Loading