|
45 | 45 | sudo apt-get install -y \ |
46 | 46 | make \ |
47 | 47 | build-essential \ |
48 | | - pkg-config |
| 48 | + pkg-config |
49 | 49 | npm install -g markdownlint-cli |
50 | | - pip install --user yamllint |
| 50 | + pip install --user yamllint codespell |
51 | 51 |
|
52 | 52 | - name: Cache Rust dependencies |
53 | 53 | uses: actions/cache@v4 |
@@ -81,28 +81,13 @@ jobs: |
81 | 81 | key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} |
82 | 82 |
|
83 | 83 | - name: Install pre-commit |
84 | | - run: pip install pre-commit |
| 84 | + run: make precommit-install |
85 | 85 |
|
86 | | - - name: Run pre-commit on Go, Rust, JavaScript, Markdown, Yaml and Python files |
87 | | - run: | |
88 | | - # Find all Go, Rust, JavaScripts, Markdown and Python files (excluding vendored/generated code) |
89 | | - FILES=$(find . -type f \( -name "*.go" -o -name "*.rs" -o -name "*.py" -o -name "*.js" -o -name "*.md" -o -name "*.yaml" -o -name "*.yml" \) \ |
90 | | - ! -path "./target/*" \ |
91 | | - ! -path "./candle-binding/target/*" \ |
92 | | - ! -path "./.git/*" \ |
93 | | - ! -path "./node_modules/*" \ |
94 | | - ! -path "./vendor/*" \ |
95 | | - ! -path "./__pycache__/*" \ |
96 | | - ! -path "./site/*" \ |
97 | | - ! -name "*.pb.go" \ |
98 | | - | tr '\n' ' ') |
99 | | - |
100 | | - if [ -n "$FILES" ]; then |
101 | | - echo "Running pre-commit on files: $FILES" |
102 | | - pre-commit run --files $FILES |
103 | | - else |
104 | | - echo "No Go, Rust, JavaScript, Markdown, Yaml, or Python files found to check" |
105 | | - fi |
| 86 | + - name: Run Code Spell Check |
| 87 | + run: make codespell |
| 88 | + |
| 89 | + - name: Run pre-commit check |
| 90 | + run: make precommit-check |
106 | 91 |
|
107 | 92 | - name: Show pre-commit results |
108 | 93 | if: failure() |
|
0 commit comments