From 901831e1f367df6b0ac3a28d51acd965c6436be4 Mon Sep 17 00:00:00 2001 From: Nikita Vasilev Date: Sun, 21 Dec 2025 12:53:07 +0400 Subject: [PATCH] ci: automate code formatting and linting with github actions --- .github/workflows/lint.yml | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..6a7c5e6 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,50 @@ +name: lint + +on: + push: + branches: + - main + pull_request: + paths: + - "Sources/**" + - ".github/workflows/ci.yml" + - "Tests/**" + +concurrency: + group: lint-${{ github.head_ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + lint: + name: lint + runs-on: macos-15 + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - uses: jdx/mise-action@v3 + - name: Run + run: mise run lint + + discover-typos: + name: discover-typos + runs-on: macos-15 + env: + DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer + steps: + - uses: actions/checkout@v6 + + - name: Set up Python environment + run: | + python3 -m venv .venv + source .venv/bin/activate + pip install --upgrade pip + pip install codespell + + - name: Discover typos + run: | + source .venv/bin/activate + codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*" \ No newline at end of file