Skip to content

Commit

Permalink
add pre-commit to ci checks
Browse files Browse the repository at this point in the history
  • Loading branch information
cwharris committed Dec 6, 2023
1 parent a7bb743 commit f967fc6
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,8 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CONDA_TOKEN: ${{ secrets.CONDA_TOKEN }}
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
checks:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
enable_check_generated_files: false
18 changes: 18 additions & 0 deletions ci/check_style.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
# Copyright (c) 2020-2023, NVIDIA CORPORATION.

set -euo pipefail

rapids-logger "Create checks conda environment"
. /opt/conda/etc/profile.d/conda.sh

rapids-dependency-file-generator \
--output conda \
--file_key checks \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml

rapids-mamba-retry env create --force -f env.yaml -n checks
conda activate checks

# Run pre-commit checks
pre-commit run --all-files --show-diff-on-failure
14 changes: 13 additions & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ files:
arch: [x86_64]
includes:
- build
- checks
- developer_productivity
- code_style
- testing
Expand All @@ -30,6 +31,12 @@ files:
- documentation
- cudatoolkit

checks:
output: none
includes:
- checks


channels:
- conda-forge
- rapidsai
Expand Down Expand Up @@ -62,6 +69,12 @@ dependencies:
- scikit-build>=0.17
- ucx=1.14

checks:
common:
- output_types: [conda]
packages:
- pre-commit

developer_productivity:
common:
- output_types: [conda]
Expand All @@ -75,7 +88,6 @@ dependencies:
- libclang-cpp=16
- libclang=16
- llvmdev=16
- pre-commit

code_style:
common:
Expand Down

0 comments on commit f967fc6

Please sign in to comment.