Skip to content

Commit

Permalink
Add black-check to workflow (#3)
Browse files Browse the repository at this point in the history
* Test workflow

* Try add balck action

* Enable for pull request

* Change triger back
  • Loading branch information
XuanWang-Amos authored Nov 17, 2023
1 parent f6c9039 commit 538c093
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/psm-interop.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: PSM Interop

env:
# Force the stdout and stderr streams to be unbuffered
PYTHONUNBUFFERED: 1

on:
pull_request:
push:
Expand Down Expand Up @@ -72,3 +76,12 @@ jobs:
- name: "Run unit tests"
if: ${{ steps.paths_filter.outputs.psm_interop_src == 'true' }}
run: python -m tests.unit

black-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check --config black.toml"
version: "23.3.0"
16 changes: 16 additions & 0 deletions black.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[tool.black]
line-length = 80
target-version = [
"py37",
"py38",
"py39",
"py310",
"py311",
]

[tool.isort]
profile = "black"
line_length = 80
single_line_exclusions = ["typing"]
force_single_line = true
force_sort_within_sections = true

0 comments on commit 538c093

Please sign in to comment.