From 51622ed5030ca77238ae454f07e80eebe63e8516 Mon Sep 17 00:00:00 2001 From: Travis Downs Date: Tue, 17 Sep 2024 22:17:43 -0300 Subject: [PATCH] python: introduce a python formatting CI check Run the official psf/black formatter action in CI in order to check that python scripts are formatted correctly. This check takes only about 10 seconds and currently runs on only the two addr2line files. --- .github/workflows/python-lint.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/python-lint.yaml diff --git a/.github/workflows/python-lint.yaml b/.github/workflows/python-lint.yaml new file mode 100644 index 0000000000..fbe1be5f6a --- /dev/null +++ b/.github/workflows/python-lint.yaml @@ -0,0 +1,16 @@ +name: Python format + +on: [push, pull_request] + +jobs: + python-format: + name: Enforce python format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: psf/black@24.8.0 + with: + version: "24.8.0" + src: ./scripts + # override options so that we can specify only specific files for now + options: "--check --diff --include=.*addr2line.*"