Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quantco/pre-commit-conda
https://github.com/quantco/pre-commit-conda
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/quantco/pre-commit-conda
- Owner: Quantco
- License: mit
- Created: 2023-11-30T21:11:05.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-19T23:41:46.000Z (10 months ago)
- Last Synced: 2024-04-16T01:24:04.966Z (9 months ago)
- Size: 27.3 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
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-commiton:
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.