hvalev 3 anni fa
parent
commit
0e1f507522
1 ha cambiato i file con 20 aggiunte e 10 eliminazioni
  1. 20 10
      .github/workflows/main.yml

+ 20 - 10
.github/workflows/main.yml

@@ -11,8 +11,28 @@ env:
   BUILD_VERSION: "0.1.0"
 
 jobs:
+  test:
+    name: Set up python matrix for testing
+    runs-on: ubuntu-18.04
+    strategy:
+      matrix:
+        python-version: [3.6, 3.7, 3.8, 3.9]
+    steps:
+      - uses: actions/checkout@master
+      - name: Setup Python Matrix
+        uses: actions/setup-python@v1
+        with:
+          python-version: ${{ matrix.python-version }}
+      - name: Install dependencies
+        run: |
+          python -m pip install --upgrade pip
+      - name: Lint with flake8
+        run: |
+          pip install flake8
+          flake8 . --max-line-length=130
   buildx:
     runs-on: ubuntu-latest
+    needs: test
     steps:
       -
         name: Checkout
@@ -33,16 +53,6 @@ jobs:
         with:
           username: ${{ secrets.DOCKERHUBUNAME }}
           password: ${{ secrets.DOCKERHUBTOKEN }} 
-      - 
-        name: Get python
-        uses: actions/setup-python@v2
-        with:
-          python-version: '3.7'
-      - 
-        name: Lint with flake8
-        run: |
-          pip install flake8
-          flake8 . --max-line-length=130
       -
         name: Run Buildx
         run: |