mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Configure ImageMagick on the runner to allow more tests to run by default
This commit is contained in:
		
							
								
								
									
										6
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -113,8 +113,6 @@ jobs: | |||||||
|       PAPERLESS_MAIL_TEST_HOST: ${{ secrets.TEST_MAIL_HOST }} |       PAPERLESS_MAIL_TEST_HOST: ${{ secrets.TEST_MAIL_HOST }} | ||||||
|       PAPERLESS_MAIL_TEST_USER: ${{ secrets.TEST_MAIL_USER }} |       PAPERLESS_MAIL_TEST_USER: ${{ secrets.TEST_MAIL_USER }} | ||||||
|       PAPERLESS_MAIL_TEST_PASSWD: ${{ secrets.TEST_MAIL_PASSWD }} |       PAPERLESS_MAIL_TEST_PASSWD: ${{ secrets.TEST_MAIL_PASSWD }} | ||||||
|       # Skip Tests which require convert |  | ||||||
|       PAPERLESS_TEST_SKIP_CONVERT: 1 |  | ||||||
|       # Enable Gotenberg end to end testing |       # Enable Gotenberg end to end testing | ||||||
|       GOTENBERG_LIVE: 1 |       GOTENBERG_LIVE: 1 | ||||||
|     steps: |     steps: | ||||||
| @@ -145,6 +143,10 @@ jobs: | |||||||
|         run: | |         run: | | ||||||
|           sudo apt-get update -qq |           sudo apt-get update -qq | ||||||
|           sudo apt-get install -qq --no-install-recommends unpaper tesseract-ocr imagemagick ghostscript libzbar0 poppler-utils |           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 |         name: Install Python dependencies | ||||||
|         run: | |         run: | | ||||||
|   | |||||||
| @@ -67,11 +67,6 @@ class TestParserLive(TestCase): | |||||||
|  |  | ||||||
|         return result |         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") |     @mock.patch("paperless_mail.parsers.MailDocumentParser.generate_pdf") | ||||||
|     def test_get_thumbnail(self, mock_generate_pdf: mock.MagicMock): |     def test_get_thumbnail(self, mock_generate_pdf: mock.MagicMock): | ||||||
|         """ |         """ | ||||||
| @@ -204,11 +199,6 @@ class TestParserLive(TestCase): | |||||||
|         "GOTENBERG_LIVE" not in os.environ, |         "GOTENBERG_LIVE" not in os.environ, | ||||||
|         reason="No gotenberg server", |         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): |     def test_generate_pdf_from_mail(self): | ||||||
|         """ |         """ | ||||||
|         GIVEN: |         GIVEN: | ||||||
| @@ -301,11 +291,6 @@ class TestParserLive(TestCase): | |||||||
|         "GOTENBERG_LIVE" not in os.environ, |         "GOTENBERG_LIVE" not in os.environ, | ||||||
|         reason="No gotenberg server", |         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): |     def test_generate_pdf_from_html(self): | ||||||
|         """ |         """ | ||||||
|         GIVEN: |         GIVEN: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Trenton H
					Trenton H