Skip to content
Merged
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
30 changes: 0 additions & 30 deletions .github/workflows/cpp-lint.yml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ concurrency:
!startsWith(github.ref, 'refs/heads/gh-readonly-queue') }}

jobs:
cpp-lint:
uses: ./.github/workflows/cpp-lint.yml
pre-commit:
uses: ./.github/workflows/pre-commit.yml
ubuntu:
needs:
- cpp-lint
- pre-commit
uses: ./.github/workflows/ubuntu.yml
mac:
needs:
- cpp-lint
- pre-commit
uses: ./.github/workflows/mac.yml
windows:
needs:
- cpp-lint
- pre-commit
uses: ./.github/workflows/windows.yml
perf:
needs:
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
name: Pre-commit checks

on:
push:
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
- '*.txt'
- 'LICENSE'
workflow_call:

jobs:
pre-commit:
Expand All @@ -28,5 +24,6 @@ jobs:
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
FROM_REF="${{ github.base_ref || 'HEAD~1' }}"
git fetch origin $FROM_REF:$FROM_REF || true
pre-commit run --from-ref $FROM_REF --to-ref HEAD
Loading