From 96c84db2a46cb5fd59884c80d4f2aece2f0dcad4 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 2 Feb 2025 15:27:38 +0100 Subject: [PATCH] GitHub Action to find typos and lint Python code # Test results: https://github.com/cclauss/CSAL/actions * https://github.com/codespell-project/codespell * https://docs.astral.sh/ruff * https://docs.astral.sh/ruff/linter --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..26e523c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +# 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: ci +on: + push: + # branches: [main, master] + pull_request: + # branches: [main, master] +jobs: + codespell: + runs-on: ubuntu-24.04-arm + steps: + - uses: actions/checkout@v4 + - uses: codespell-project/actions-codespell@v2 + with: + ignore_words_list: earch,ect,flushin,vas + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/ruff-action@v3 + with: + args: check --ignore=ALL