ci: add basic config checking with ruff
[buildbot.git] / .github / workflows / build-push.yml
index 666c9e39d6fab4dcafe6d4d11f3928485c210299..b6f1c3c938c51b4bbb0b96b88f80834d354ca5ab 100644 (file)
@@ -15,9 +15,38 @@ concurrency:
   cancel-in-progress: ${{ github.event_name == 'pull_request' }}
 
 jobs:
+  test-lint:
+    name: Test with Python ${{ matrix.python-version }}
+    runs-on: ubuntu-latest
+
+    strategy:
+      matrix:
+        python-version:
+          - "3.9"
+          - "3.10"
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - uses: actions/setup-python@v4
+        with:
+          python-version: ${{ matrix.python-version }}
+
+      - name: Install dependencies
+        run: pip install -r requirements-dev.txt
+
+      - name: Lint with ruff
+        run: ruff phase*/master.cfg
+
+# FIXME
+#     - name: Stylecheck with black
+#       run: black phase*/master.cfg
+
   build-test-push:
     name: Build, test and push containers
     runs-on: ubuntu-latest
+    needs: test-lint
 
     permissions:
       packages: write