From 53be200796106212bd62734fcbc9c4a4560b203c Mon Sep 17 00:00:00 2001 From: Elias Mueller Date: Fri, 26 Jan 2024 21:29:39 +0100 Subject: [PATCH 01/10] ci: Trigger on pull request --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8a0d066..20126f1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,6 +4,8 @@ name: 'Tests' on: push: branches: [ '**' ] + pull_request: + branches: [ '**' ] defaults: From d98da9b4f67a8abf9a84a6a62bd562b35d46f4d4 Mon Sep 17 00:00:00 2001 From: Elias Mueller Date: Fri, 26 Jan 2024 21:29:53 +0100 Subject: [PATCH 02/10] ci: run on ubuntu-latest --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 20126f1..30c7e12 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ defaults: jobs: test-linux: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest name: 'Linux - Python' strategy: matrix: From 4ff35c05eb66c14cec958dfe13001f7610268c44 Mon Sep 17 00:00:00 2001 From: Elias Mueller Date: Fri, 26 Jan 2024 21:30:25 +0100 Subject: [PATCH 03/10] ci: run on 3.11 + 3.12 also --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 30c7e12..50dda30 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,7 @@ jobs: name: 'Linux - Python' strategy: matrix: - python-version: [ '3.8', '3.9', '3.10' ] + python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] env: DISPLAY: :0 PY_MPV_SKIP_TESTS: >- @@ -66,7 +66,7 @@ jobs: name: 'Windows - Python' strategy: matrix: - python-version: [ '3.8', '3.9', '3.10' ] + python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] steps: - uses: actions/checkout@v3 - name: 'Install Python' From faa5f2f0b3ed2d4af5b47e82470abc2671e63353 Mon Sep 17 00:00:00 2001 From: Elias Mueller Date: Fri, 26 Jan 2024 21:30:59 +0100 Subject: [PATCH 04/10] ci: upgrade actions --- .github/workflows/tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 50dda30..015320b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,9 +25,9 @@ jobs: PY_MPV_SKIP_TESTS: >- test_wait_for_property_event_overflow steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: 'Install Python' - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: 'Update Packages' @@ -68,9 +68,9 @@ jobs: matrix: python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: 'Install Python' - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: 'Provide libmpv' From f1beef7d147793125533b8fd8ecb8288808a8fa3 Mon Sep 17 00:00:00 2001 From: Elias Mueller Date: Fri, 26 Jan 2024 21:31:19 +0100 Subject: [PATCH 05/10] ci: upgrade libmpv --- .github/workflows/tests.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 015320b..05988c7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -77,12 +77,16 @@ jobs: run: | function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; } - ARTIFACT="mpv-dev-x86_64-20220619-git-c1a46ec.7z" + ARTIFACT="mpv-dev-x86_64-20240121-git-a39f9b6.7z" + SHA1="ba844abcf874c832108f497af889487103967c67" URL="https://sourceforge.net/projects/mpv-player-windows/files/libmpv/$ARTIFACT" execute curl -L -O "$URL" + echo -e "\033[0;34mecho -n $SHA1 $ARTIFACT > $ARTIFACT.sha1\033[0m" + echo -n "$SHA1 $ARTIFACT" > "$ARTIFACT.sha1" + execute sha1sum --check "$ARTIFACT.sha1" execute 7z x "$ARTIFACT" - execute mv mpv-2.dll tests + execute mv libmpv-2.dll tests - name: 'Setup Test Environment' run: | function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; } From bcc0c22d72db216436dad1bf55940d658636579e Mon Sep 17 00:00:00 2001 From: Elias Mueller Date: Fri, 26 Jan 2024 21:32:54 +0100 Subject: [PATCH 06/10] ci: upgrade pytest --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index ded363c..7d4c6c7 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,2 +1,2 @@ PyVirtualDisplay>=3.0 -pytest>=7.1.2 +pytest>=7.4.4 From b14dabca45baad1565ae454c110b496c398a1f08 Mon Sep 17 00:00:00 2001 From: Elias Mueller Date: Fri, 26 Jan 2024 21:54:23 +0100 Subject: [PATCH 07/10] ci: disable fail-fast behavior --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 05988c7..0a48808 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,6 +20,7 @@ jobs: strategy: matrix: python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] + fail-fast: false env: DISPLAY: :0 PY_MPV_SKIP_TESTS: >- @@ -67,6 +68,7 @@ jobs: strategy: matrix: python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] + fail-fast: false steps: - uses: actions/checkout@v4 - name: 'Install Python' From 310a3aafb7ff8f07425ef8bffbc198d0fcc68ce3 Mon Sep 17 00:00:00 2001 From: Elias Mueller Date: Fri, 26 Jan 2024 22:02:19 +0100 Subject: [PATCH 08/10] ci: replace pytest with unittest Using pytest, we run into access violation errors on Windows. They disappear when we use the unittest module. --- .github/workflows/tests.yml | 2 +- tests/requirements.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0a48808..ae424c6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -103,4 +103,4 @@ jobs: function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; } execute source venv/Scripts/activate - execute python -m pytest + execute python -m unittest diff --git a/tests/requirements.txt b/tests/requirements.txt index 7d4c6c7..eabe145 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,2 +1 @@ PyVirtualDisplay>=3.0 -pytest>=7.4.4 From f00031ca919e2c78c2eb88c41bdd9cf499bb7560 Mon Sep 17 00:00:00 2001 From: Elias Mueller Date: Fri, 26 Jan 2024 22:02:38 +0100 Subject: [PATCH 09/10] ci: use libmpv-v3 on Windows --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ae424c6..7387873 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -79,8 +79,8 @@ jobs: run: | function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; } - ARTIFACT="mpv-dev-x86_64-20240121-git-a39f9b6.7z" - SHA1="ba844abcf874c832108f497af889487103967c67" + ARTIFACT="mpv-dev-x86_64-v3-20240121-git-a39f9b6.7z" + SHA1="0764a4b899a7ebb1476e5b491897c5e2eed8a07f" URL="https://sourceforge.net/projects/mpv-player-windows/files/libmpv/$ARTIFACT" execute curl -L -O "$URL" From 8bff302888ab9e0464bb8661e706b76f4e83a4eb Mon Sep 17 00:00:00 2001 From: Elias Mueller Date: Fri, 26 Jan 2024 22:09:48 +0100 Subject: [PATCH 10/10] ci: replace pytest with unittest Using pytest, we run into access violation errors on Windows. They disappear when we use the unittest module. --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7387873..52eb072 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -60,7 +60,7 @@ jobs: function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; } execute source venv/bin/activate - execute xvfb-run python -m pytest + execute xvfb-run python -m unittest test-windows: runs-on: windows-latest