fix: CI fail #106
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Format Python Code | |
on: | |
push: | |
branches: | |
- '**' | |
paths: | |
- "skscope/*.py" | |
- "pytest/*.py" | |
- ".github/workflows/format.yml" | |
pull_request: | |
paths: | |
- "skscope/*.py" | |
- "pytest/*.py" | |
- ".github/workflows/format.yml" | |
workflow_dispatch: | |
jobs: | |
python-code-format: | |
runs-on: ubuntu-latest | |
env: | |
PYTHON: "3.9" | |
steps: | |
- uses: actions/checkout@master | |
- name: Setup Python | |
uses: actions/setup-python@master | |
with: | |
python-version: 3.9 | |
- name: Checkout repository and submodules | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install packages | |
run: pip install black | |
- name: Formatter | |
run: | | |
black ./skscope | |
black ./pytest | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
commit-message: Auto code format | |
title: Fixes by format action | |
body: This is an auto-generated PR with fixes. | |
labels: automated pr |