]> littlesong.place Git - littlesongplace.git/commitdiff
Combine tests into single job
authorChris Fulljames <christianfulljames@gmail.com>
Fri, 4 Apr 2025 22:57:28 +0000 (18:57 -0400)
committerChris Fulljames <christianfulljames@gmail.com>
Fri, 4 Apr 2025 22:57:28 +0000 (18:57 -0400)
.github/workflows/test-and-deploy.yml

index 8486dde12debab3c4d95b7c8966998af27bd1e32..a1894a3b79b1e7c18fddd602c266a841f8808af8 100644 (file)
@@ -28,43 +28,6 @@ jobs:
         name: pkg-wheel
         path: dist/littlesongplace-*.whl
 
-  run-offline-tests:
-    runs-on: ubuntu-latest
-    needs: build-package
-    steps:
-    - uses: actions/checkout@v1
-
-    - name: Download package wheel
-      uses: actions/download-artifact@v4
-      with:
-        name: pkg-wheel
-
-    - name: Set up Python
-      uses: actions/setup-python@v3
-      with:
-        python-version: "3.11"
-
-    - name: Install ffmpeg
-      run: |
-        sudo apt update
-        sudo apt install ffmpeg
-
-    - name: Install mpck
-      run: |
-        wget https://github.com/Sjord/checkmate/releases/download/v0.21/mpck_0.21-1_amd64.deb
-        sudo dpkg --install mpck_0.21-1_amd64.deb
-
-    - name: Install Dependencies
-      run: |
-        python -m pip install --upgrade pip
-        pip install ./littlesongplace-*.whl
-        pip install -r dev-requirements.txt
-
-    - name: Run pytest
-      working-directory: ./test
-      run: |
-        pytest test_offline.py
-
   deploy-test-instance:
     runs-on: ubuntu-latest
     needs: build-package
@@ -117,7 +80,7 @@ jobs:
           # Restart service
           sudo systemctl restart littlesongplace-test.service
 
-  run-online-tests:
+  run-tests:
     runs-on: ubuntu-latest
     needs: deploy-test-instance
     steps:
@@ -133,6 +96,16 @@ jobs:
       with:
         python-version: "3.11"
 
+    - name: Install ffmpeg
+      run: |
+        sudo apt update
+        sudo apt install ffmpeg
+
+    - name: Install mpck
+      run: |
+        wget https://github.com/Sjord/checkmate/releases/download/v0.21/mpck_0.21-1_amd64.deb
+        sudo dpkg --install mpck_0.21-1_amd64.deb
+
     - name: Install Dependencies
       run: |
         python -m pip install --upgrade pip
@@ -142,12 +115,11 @@ jobs:
     - name: Run pytest
       working-directory: ./test
       run: |
-        pytest test_online.py
+        pytest
 
   deploy-prod-instance:
     needs:
-      - run-offline-tests
-      - run-online-tests
+      - run-tests
     runs-on: ubuntu-latest
     if: github.ref == 'refs/heads/master'
     steps: