mirror of
https://github.com/XRPLF/clio.git
synced 2026-07-30 18:40:24 +00:00
style: Use pre-commit tool and add simple config (#2029)
I started with really simple pre-commit hooks and will add more on top. Important files: - `.pre-commit-config.yaml` - the config for pre-commit - `.github/workflows/pre-commit.yml` - runs pre-commit hooks in branches and `develop` - `.github/workflows/pre-commit-autoupdate.yml` - autoupdates pre-commit hooks once in a month
This commit is contained in:
25
.github/workflows/pre-commit.yml
vendored
Normal file
25
.github/workflows/pre-commit.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Run pre-commit hooks
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
run-hooks:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repo ⚡️
|
||||
uses: actions/checkout@v4
|
||||
- name: Set Up Python 🐍
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
- name: Install pre-commit 📦
|
||||
run: |
|
||||
pip install --upgrade pip
|
||||
pip install --upgrade pre-commit
|
||||
- name: Run pre-commit ✅
|
||||
run: pre-commit run --all-files
|
||||
Reference in New Issue
Block a user