-
Notifications
You must be signed in to change notification settings - Fork 17
39 lines (37 loc) · 1.2 KB
/
ci-precommit.yml
File metadata and controls
39 lines (37 loc) · 1.2 KB
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
34
35
36
37
38
39
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2026 NVIDIA CORPORATION & AFFILIATES.
# SPDX-FileCopyrightText: All rights reserved.
# SPDX-License-Identifier: Apache-2.0
name: Pre-commit checks
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
pre-commit:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install pre-commit
run: |
uv venv --clear --python ${{ matrix.python-version }}
uv pip install --python .venv/bin/python pre-commit
echo "$PWD/.venv/bin" >> "$GITHUB_PATH"
# Mirror every check-style Makefile target so the Makefile remains the
# single source of truth. Skip ``install`` / ``editable-install`` /
# ``setup-ci`` (env bootstrap done above), ``pytest`` (own workflow in
# ``ci-tests.yml``)
- name: Run pre-commit checks via Makefile
run: |
make black
make interrogate
make lint
make license