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

GitHub Action to find invalid Python files #7

Closed
wants to merge 3 commits into from
Closed
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
19 changes: 19 additions & 0 deletions .github/workflows/codespell_and_ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This Action uses minimal steps to run in ~5 seconds to rapidly:
# look for typos in the codebase using codespell, and
# lint Python code using ruff and provide intuitive GitHub Annotations to contributors.
# https://github.com/codespell-project/codespell#readme
# https://docs.astral.sh/ruff/
name: codespell_and_ruff
on:
push:
# branches: [main, master]
pull_request:
# branches: [main, master]
jobs:
codespell_and_ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pip install --user codespell[toml] ruff
- run: codespell --ignore-words-list="ans,donot" --skip="./data/*,*.csv,*.pdf,*.txt,*.yara" || true
- run: ruff check --output-format=github --select=E9 # Look for Python syntax errors