From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Tue, 31 Jan 2023 22:26:04 +0000 (-0800) Subject: Configure ImageMagick on the runner to allow more tests to run by default X-Git-Tag: v1.13.0~1^2~36^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2570%2Fhead;p=thirdparty%2Fpaperless-ngx.git Configure ImageMagick on the runner to allow more tests to run by default --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adf03d4bb6..68eb89a30a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -113,8 +113,6 @@ jobs: PAPERLESS_MAIL_TEST_HOST: ${{ secrets.TEST_MAIL_HOST }} PAPERLESS_MAIL_TEST_USER: ${{ secrets.TEST_MAIL_USER }} PAPERLESS_MAIL_TEST_PASSWD: ${{ secrets.TEST_MAIL_PASSWD }} - # Skip Tests which require convert - PAPERLESS_TEST_SKIP_CONVERT: 1 # Enable Gotenberg end to end testing GOTENBERG_LIVE: 1 steps: @@ -145,6 +143,10 @@ jobs: run: | sudo apt-get update -qq sudo apt-get install -qq --no-install-recommends unpaper tesseract-ocr imagemagick ghostscript libzbar0 poppler-utils + - + name: Configure ImageMagick + run: | + sudo cp docker/imagemagick-policy.xml /etc/ImageMagick-6/policy.xml - name: Install Python dependencies run: | diff --git a/src/paperless_mail/tests/test_parsers_live.py b/src/paperless_mail/tests/test_parsers_live.py index 7ea56d7e4f..90c172d07d 100644 --- a/src/paperless_mail/tests/test_parsers_live.py +++ b/src/paperless_mail/tests/test_parsers_live.py @@ -67,11 +67,6 @@ class TestParserLive(TestCase): return result - # Only run if convert is available - @pytest.mark.skipif( - "PAPERLESS_TEST_SKIP_CONVERT" in os.environ, - reason="PAPERLESS_TEST_SKIP_CONVERT set, skipping Test", - ) @mock.patch("paperless_mail.parsers.MailDocumentParser.generate_pdf") def test_get_thumbnail(self, mock_generate_pdf: mock.MagicMock): """ @@ -204,11 +199,6 @@ class TestParserLive(TestCase): "GOTENBERG_LIVE" not in os.environ, reason="No gotenberg server", ) - # Only run if convert is available - @pytest.mark.skipif( - "PAPERLESS_TEST_SKIP_CONVERT" in os.environ, - reason="PAPERLESS_TEST_SKIP_CONVERT set, skipping Test", - ) def test_generate_pdf_from_mail(self): """ GIVEN: @@ -301,11 +291,6 @@ class TestParserLive(TestCase): "GOTENBERG_LIVE" not in os.environ, reason="No gotenberg server", ) - # Only run if convert is available - @pytest.mark.skipif( - "PAPERLESS_TEST_SKIP_CONVERT" in os.environ, - reason="PAPERLESS_TEST_SKIP_CONVERT set, skipping Test", - ) def test_generate_pdf_from_html(self): """ GIVEN: