Skip to content

Commit

Permalink
Merge pull request #118 from geigerzaehler/fix-art-resize-tests
Browse files Browse the repository at this point in the history
Install imagemagick on CI to handle runner image upgrade
  • Loading branch information
geigerzaehler authored Jan 10, 2025
2 parents 92f596a + e2d6b71 commit 0e3c0b0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Check and test

on: [push, pull_request]
on:
push:
branches: [main]
pull_request:

env:
FORCE_COLOR: 1
Expand All @@ -15,13 +18,11 @@ jobs:
- "3.13" # latest
include:
- python-version: "3.10"
os: windows-2022
os: windows-latest
- python-version: "3.10"
os: macos-12

runs-on: ${{ matrix.os }}
# Fails because of https://github.com/beetbox/mediafile/pull/75
continue-on-error: ${{ matrix.python-version == '3.13' }}

steps:
- uses: actions/checkout@v4
Expand All @@ -36,6 +37,8 @@ jobs:
- run: poetry run ruff format --check
- run: poetry run ruff check
- run: poetry run pyright --warnings
- run: sudo apt-get install -y imagemagick
if: runner.os == 'Linux'
- run: poetry run pytest
- run: poetry run coverage xml
- uses: coverallsapp/github-action@v2
Expand All @@ -55,15 +58,17 @@ jobs:
- "git+https://github.com/beetbox/beets#master"
- "beets==1.6.1"

continue-on-error: ${{ contains(matrix.beets, 'master') }}
steps:
- uses: actions/checkout@v4
- run: pip install poetry
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: poetry
- run: poetry env use $(which python)
- run: poetry env use "$(which python)"
- run: poetry install
- run: poetry add ${{ matrix.beets }}
- run: poetry run pyright --warnings
- run: sudo apt-get install -y imagemagick
- run: poetry run pytest
10 changes: 1 addition & 9 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def test_unkown_collection(self):
assert str(e.value) == "Alternative collection 'unkown' not found."

@pytest.mark.skipif(
sys.platform.startswith("win"), reason="Image conversion not available"
not sys.platform.startswith("linux"), reason="Image conversion not available"
)
def test_embed_art(self, tmp_path: Path):
"""Test that artwork is embedded and updated to match the source file.
Expand Down

0 comments on commit 0e3c0b0

Please sign in to comment.