mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-24 14:15:17 +02:00
feature: 支持pre-commit检查代码规范
This commit is contained in:
parent
9229b5a7f9
commit
fa1af92537
1 changed files with 30 additions and 0 deletions
30
.github/workflows/pre-commit.yaml
vendored
Normal file
30
.github/workflows/pre-commit.yaml
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
name: Pre-commit checks
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
pre-commit-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.9.17'
|
||||
|
||||
- name: Install pre-commit
|
||||
run: pip install pre-commit
|
||||
|
||||
- name: Initialize pre-commit
|
||||
run: pre-commit install
|
||||
|
||||
- name: Run pre-commit hooks
|
||||
run: pre-commit run --all-files
|
||||
Loading…
Add table
Add a link
Reference in a new issue