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

chore(ci): Add spell checker CI #180

Closed
wants to merge 2 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
Empty file added .github/.codespellignore
Empty file.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
go-version: 1.23.x

- name: "Build binaries"
- name: 'Build binaries'
run: make build

lint:
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
strategy:
matrix:
os: [ ubuntu-22.04 ] # list of os: https://github.com/actions/virtual-environments
os: [ubuntu-22.04] # list of os: https://github.com/actions/virtual-environments
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/spell_checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Spell Checker

on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref_name }}

- name: Configure Git to Use HTTPS
run: |
git config --global url."https://github.com/".insteadOf "git@github.com:"

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y codespell

- name: Run codespell
run: codespell -w --skip="*.pulsar.go,*.pb.go,*.pb.gw.go,*.json,*.git,*.js,go.sum,go.mod,.github,*.css" --ignore-words=.github/.codespellignore

- name: Create Pull Request for spelling fixes
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore: fix spelling errors'
branch: 'ci/fix-typos'
delete-branch: true
title: 'chore: fix spelling errors'
body: |
This PR fixes typos in the codebase.
Please review and merge if everything looks good.
If there are proto changes, run `make proto-gen` and commit them.
labels: 'spellcheck'
Loading