From c7a42e98f0f27998cc57d7471841953e5449ddd3 Mon Sep 17 00:00:00 2001 From: Xu Zhao Date: Fri, 8 Nov 2024 19:42:14 -0500 Subject: [PATCH] Add ufmt linter for pyproject --- .github/workflows/linter.yaml | 26 ++++++++++++++++++++++++++ pyproject.toml | 3 +++ 2 files changed, 29 insertions(+) create mode 100644 .github/workflows/linter.yaml create mode 100644 pyproject.toml diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml new file mode 100644 index 00000000..515a1aa3 --- /dev/null +++ b/.github/workflows/linter.yaml @@ -0,0 +1,26 @@ +name: TritonBench Linter +on: + pull_request: + push: + branches: + - main + workflow_dispatch: + + +jobs: + pylint: + permissions: + contents: read + runs-on: ubuntu-latest + steps: + - name: Checkout + with: + path: tritonbench + - name: Check Formatting + uses: omnilib/ufmt@action-v1 + with: + path: tritonbench + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }} + cancel-in-progress: true \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..d13664e8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[tool.ufmt] +formatter = "ruff-api" +excludes = ["submodules/"]