From: Chris Fulljames Date: Fri, 4 Apr 2025 22:57:28 +0000 (-0400) Subject: Combine tests into single job X-Git-Url: https://littlesong.place/gitweb/?a=commitdiff_plain;h=7f244ad99573b7d0a50d97b3e34e489185a00c7f;p=littlesongplace.git Combine tests into single job --- diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index 8486dde..a1894a3 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -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: