]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
.github/workflows: Add python checks for support scripts 1134/head
authorCezar Craciunoiu <cezar.craciunoiu@gmail.com>
Sat, 14 Oct 2023 09:02:59 +0000 (12:02 +0300)
committerCezar Craciunoiu <cezar.craciunoiu@gmail.com>
Thu, 2 Nov 2023 15:29:47 +0000 (17:29 +0200)
Signed-off-by: Cezar Craciunoiu <cezar.craciunoiu@gmail.com>
.github/workflows/pychecks.yaml [new file with mode: 0644]

diff --git a/.github/workflows/pychecks.yaml b/.github/workflows/pychecks.yaml
new file mode 100644 (file)
index 0000000..ba60ef4
--- /dev/null
@@ -0,0 +1,32 @@
+name: Python Checks
+
+on:
+  push:
+    branches: [staging, stable]
+    paths:
+      - 'support/scripts/**'
+      - '.github/workflows/pychecks.yaml'
+
+  pull_request:
+    types: [opened, synchronize, reopened]
+    branches: [staging]
+    paths:
+      - 'support/scripts/**'
+      - '.github/workflows/pychecks.yaml'
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+
+      - name: black
+        uses: psf/black@stable
+        with:
+          src: support/scripts
+
+      - name: ruff
+        uses: chartboost/ruff-action@v1
+        if: success() || failure()
+        with:
+          src: support/scripts
\ No newline at end of file