From af26f7a71f59197477f6d72107bc6bfe084cc05e Mon Sep 17 00:00:00 2001 From: mathiasg Date: Thu, 29 Aug 2024 10:23:36 -0400 Subject: [PATCH] ci: add style check --- .github/workflows/style.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/style.yml diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml new file mode 100644 index 0000000..a70d88e --- /dev/null +++ b/.github/workflows/style.yml @@ -0,0 +1,38 @@ +name: Contribution checks + +on: + push: + branches: + - main + pull_request: + branches: + - main + +defaults: + run: + shell: bash + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + style: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: pipx run ruff check . + - run: pipx run ruff format --diff . + + 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