@@ -14,93 +14,30 @@ defaults:
14
14
15
15
16
16
jobs :
17
- test-linux :
17
+ test :
18
18
runs-on : ubuntu-latest
19
19
name : ' Linux - Python'
20
20
strategy :
21
21
matrix :
22
- python-version : [ '3.8', '3.9', '3.10', '3.11', '3.12 ' ]
22
+ python-version : [ '3.13 ' ]
23
23
fail-fast : false
24
24
env :
25
- DISPLAY : :0
26
25
PY_MPV_SKIP_TESTS : >-
27
26
test_wait_for_property_event_overflow
27
+ PY_MPV_TEST_VO : ' null'
28
28
steps :
29
29
- uses : actions/checkout@v4
30
30
- name : ' Install Python'
31
31
uses : actions/setup-python@v5
32
32
with :
33
33
python-version : ${{ matrix.python-version }}
34
- - name : ' Update Packages'
35
- run : |
36
- function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
37
-
38
- execute sudo apt update -y
39
- execute sudo apt upgrade -y
40
- - name : ' Install Dependencies'
41
- run : |
42
- function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
43
-
44
- execute sudo apt install -y libmpv1 xvfb
45
- - name : ' Start Xvfb'
46
- run : |
47
- echo -e "\033[0;34msudo /usr/bin/Xvfb $DISPLAY -screen 0 1920x1080x24 &\033[0m";
48
- sudo /usr/bin/Xvfb $DISPLAY -screen 0 1920x1080x24 &
49
- - name : ' Setup Test Environment'
50
- run : |
51
- function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
52
-
53
- execute python -m venv venv
54
- execute source venv/bin/activate
55
- execute python -m pip install --upgrade pip
56
- execute python -m pip install wheel
57
- execute python -m pip install -r tests/requirements.txt
58
- - name : ' Run Python Tests'
59
- run : |
60
- function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
61
-
62
- execute source venv/bin/activate
63
- execute xvfb-run python -m unittest
64
-
65
- test-windows :
66
- runs-on : windows-latest
67
- name : ' Windows - Python'
68
- strategy :
69
- matrix :
70
- python-version : [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
71
- fail-fast : false
72
- steps :
73
- - uses : actions/checkout@v4
74
- - name : ' Install Python'
75
- uses : actions/setup-python@v5
34
+ - name : Install uv
35
+ uses : astral-sh/setup-uv@v5
76
36
with :
77
- python-version : ${{ matrix.python-version }}
78
- - name : ' Provide libmpv'
79
- run : |
80
- function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
81
-
82
- ARTIFACT="mpv-dev-x86_64-v3-20240121-git-a39f9b6.7z"
83
- SHA1="0764a4b899a7ebb1476e5b491897c5e2eed8a07f"
84
- URL="https://sourceforge.net/projects/mpv-player-windows/files/libmpv/$ARTIFACT"
85
-
86
- execute curl -L -O "$URL"
87
- echo -e "\033[0;34mecho -n $SHA1 $ARTIFACT > $ARTIFACT.sha1\033[0m"
88
- echo -n "$SHA1 $ARTIFACT" > "$ARTIFACT.sha1"
89
- execute sha1sum --check "$ARTIFACT.sha1"
90
- execute 7z x "$ARTIFACT"
91
- execute mv libmpv-2.dll tests
37
+ enable-cache : false
38
+ - name : ' Install Dependencies'
39
+ run : sudo apt install -y libmpv2
92
40
- name : ' Setup Test Environment'
93
- run : |
94
- function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
95
-
96
- execute python -m venv venv
97
- execute source venv/Scripts/activate
98
- execute python -m pip install --upgrade pip
99
- execute python -m pip install wheel
100
- execute python -m pip install -r tests/requirements.txt
41
+ run : uv sync --extra test
101
42
- name : ' Run Python Tests'
102
- run : |
103
- function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
104
-
105
- execute source venv/Scripts/activate
106
- execute python -m unittest
43
+ run : uv run -m pytest --reruns 3 --reruns-delay 3
0 commit comments