summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElias Müller <elias.mr1@gmail.com>2022-07-09 19:45:07 +0200
committerjaseg <136313+jaseg@users.noreply.github.com>2022-07-11 12:44:47 +0200
commit6f07273482fad7036d83cb0bc80153061798224d (patch)
tree7d4013a80bc6e6ad1503c6d56188f1b7834a1ecc
parentbb7d0a332dd4f7268965400efb2cc52915c5eb4c (diff)
downloadpython-mpv-6f07273482fad7036d83cb0bc80153061798224d.tar.gz
python-mpv-6f07273482fad7036d83cb0bc80153061798224d.tar.bz2
python-mpv-6f07273482fad7036d83cb0bc80153061798224d.zip
Cleanup pipeline
-rw-r--r--.github/workflows/tests.yml25
1 files changed, 15 insertions, 10 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 78a5f1a..7e0c067 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -17,7 +17,6 @@ jobs:
name: 'Linux - Python'
strategy:
matrix:
- # '3.7' -> E ImportError: cannot import name 'InvalidStateError' from 'concurrent.futures' (/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/concurrent/futures/__init__.py)
python-version: [ '3.8', '3.9', '3.10' ]
env:
DISPLAY: :0
@@ -32,18 +31,21 @@ jobs:
- name: 'Update Packages'
run: |
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
+
execute sudo apt update -y && sudo apt upgrade -y
- name: 'Install Dependencies'
run: |
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
+
execute sudo apt install -y libmpv1 xvfb
- name: 'Start Xvfb'
run: |
echo -e "\033[0;34msudo /usr/bin/Xvfb $DISPLAY -screen 0 1920x1080x24 &\033[0m";
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1920x1080x24 &
- - name: 'Create Virtual Environment'
+ - name: 'Setup Test Environment'
run: |
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
+
execute python -m venv venv
execute source venv/bin/activate
execute python -m pip install --upgrade pip
@@ -52,6 +54,7 @@ jobs:
- name: 'Run Python Tests'
run: |
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
+
execute source venv/bin/activate
execute xvfb-run python -m pytest
@@ -67,14 +70,6 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- - name: 'Setup Build Environment'
- run: |
- function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
- execute python -m venv venv
- execute source venv/Scripts/activate
- execute python -m pip install --upgrade pip
- execute python -m pip install wheel
- execute python -m pip install -r tests/requirements.txt
- name: 'Provide libmpv'
run: |
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
@@ -85,8 +80,18 @@ jobs:
execute curl -L -O "$URL"
execute 7z x "$ARTIFACT"
execute mv mpv-2.dll tests
+ - name: 'Setup Test Environment'
+ run: |
+ function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
+
+ execute python -m venv venv
+ execute source venv/Scripts/activate
+ execute python -m pip install --upgrade pip
+ execute python -m pip install wheel
+ execute python -m pip install -r tests/requirements.txt
- name: 'Run Python Tests'
run: |
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
+
execute source venv/Scripts/activate
execute python -m pytest