Explorar el Código

added matrix to run on different operating systems and python versions

prozessorkern hace 4 años
padre
commit
6dbf543113
Se han modificado 1 ficheros con 10 adiciones y 7 borrados
  1. 10 7
      .github/workflows/python-app.yml

+ 10 - 7
.github/workflows/python-app.yml

@@ -5,21 +5,24 @@ name: Python application
 
 on:
   push:
-    branches: [ master ]
   pull_request:
-    branches: [ master ]
 
 jobs:
-  build:
-
-    runs-on: ubuntu-latest
+  test:
+    name: Test on ${{ matrix.os }}
+    runs-on: ${{ matrix.os }}
+    
+    strategy:
+      matrix:
+        python: [2.7, 3.5, 3.6, 3.7, 3.8]
+        os: [ubuntu-latest, windows-latest, macOS-latest]
 
     steps:
     - uses: actions/checkout@v2
-    - name: Set up Python 3.8
+    - name: Set up Python ${{ matrix.python }}
       uses: actions/setup-python@v2
       with:
-        python-version: 3.8
+        python-version: ${{ matrix.python }}
     - name: Install dependencies
       run: |
         python -m pip install --upgrade pip