Repository navigation
69 lines (56 loc) · 1.93 KB
/
Copy pathci_check.yml
File metadata and controls
69 lines (56 loc) · 1.93 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
name: Check
on:
pull_request:
push:
branches: [main]
concurrency:
group: ci-check-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
check:
name: Pre-commit
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Set up uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8
with:
version: 0.9.22
enable-cache: true
cache-dependency-glob: uv.lock
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: 1.26.1
cache: false
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4
with:
toolchain: stable
cache: false
- name: Install just and cargo-about
uses: taiki-e/install-action@c070f87102a1c75b3183910f391c1cb887fe13c8 # v2.77.6
with:
tool: just@1.50.0,cargo-about@0.9.0
- name: Cache pre-commit environments
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cache/pre-commit
key: fabric-pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml', 'uv.lock') }}
- name: Create virtual environment
run: uv venv --python "${UV_PYTHON:-${{ 3.12 }}}" .venv
- name: Install pre-commit
run: uv sync --frozen --no-default-groups --group dev --no-install-project
- name: Run pre-commit
run: uv run --no-sync pre-commit run --all-files --show-diff-on-failure