forked from ai-dynamo/aiperf
-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (27 loc) · 867 Bytes
/
Copy pathpre-commit.yml
File metadata and controls
33 lines (27 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
name: "Pre-commit"
on:
pull_request:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Fetch base commit
run: |
git remote add base "${{ github.event.pull_request.base.repo.clone_url }}"
git fetch --no-tags --depth=1 base ${{ github.event.pull_request.base.sha }}
- uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install dependencies
run: |
make first-time-setup PYTHON_VERSION=3.10
- uses: pre-commit/action@v3.0.1
with:
extra_args: >-
--from-ref ${{ github.event.pull_request.base.sha }}
--to-ref ${{ github.sha }}