https://github.com/quantco/pre-commit-conda
https://github.com/quantco/pre-commit-conda
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/quantco/pre-commit-conda
- Owner: Quantco
- License: mit
- Created: 2023-11-30T21:11:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-03-02T14:59:08.000Z (17 days ago)
- Last Synced: 2026-03-02T18:00:00.752Z (16 days ago)
- Size: 35.2 KB
- Stars: 2
- Watchers: 6
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# pre-commit-conda GitHub Action
## Overview
`pre-commit-conda` is a fork of the `pre-commit/action`. This GitHub Action runs pre-commit hooks in a conda environment managed by micromamba.
## Features
- Customizable Python version.
- Optional custom `condarc-file`.
- Caches pre-commit environment.
## Usage
Create `.github/workflows/pre-commit.yml` in your repository. Here's a quick template:
```yaml
name: pre-commit
on:
pull_request:
push:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run pre-commit with Conda
uses: quantco/pre-commit-conda@v1
with:
extra-args: '--all-files' # Optional extra arguments (default: --all-files)
condarc-file: '' # Optional custom condarc file (default: no custom condarc_file)
python-version: '3.11' # Optional Python version (default: 3.11)
```
## Customizations
- `extra-args`: Specify single hook id or options for `pre-commit run`.
- `condarc-file`: Path to custom condarc file.
- `python-version`: Specify Python version.