Skip to content

Commit

Permalink
add yapf workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rlsu9 committed Dec 31, 2024
1 parent 2125b73 commit ccffb8b
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/yapf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: yapf

on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
paths:
- "**/*.py"
- .github/workflows/yapf.yml
pull_request:
branches:
- main
paths:
- "**/*.py"
- .github/workflows/yapf.yml

jobs:
yapf:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12' # or any version you need

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install yapf==0.32.0
pip install toml==0.10.2
- name: Running yapf
run: |
yapf --diff --recursive .

0 comments on commit ccffb8b

Please sign in to comment.