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
# Restart service
sudo systemctl restart littlesongplace-test.service
- run-online-tests:
+ run-tests:
runs-on: ubuntu-latest
needs: deploy-test-instance
steps:
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
- 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: