[CI] Fix 'pre-commit' job influence on the rest of the pre-commit pipeline #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pre-commit checks | |
on: | |
pull_request: | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Setup environment | |
run: | | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends -y \ | |
gcc-14 g++-14 ninja-build python3-pip clang-format-16 | |
python3 -m pip install -r requirements.txt | |
- name: Run pre-commit checks | |
run: | | |
git fetch origin ${{ github.base_ref }}:${{ github.base_ref }} | |
pre-commit run --from-ref ${{ github.base_ref }} --to-ref HEAD |