mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	trying to make travis work.
This commit is contained in:
		
							
								
								
									
										59
									
								
								.travis.yml
									
									
									
									
									
								
							
							
						
						
									
										59
									
								
								.travis.yml
									
									
									
									
									
								
							| @@ -1,56 +1,19 @@ | |||||||
| language: python | language: python | ||||||
|  |  | ||||||
| before_install: | python: | ||||||
| - sudo apt-get update -qq |   - "3.6" | ||||||
| - sudo apt-get install -qq libpoppler-cpp-dev unpaper tesseract-ocr |   - "3.7" | ||||||
|  |   - "3.8" | ||||||
| sudo: false |   - "3.9" | ||||||
|  |  | ||||||
| matrix: |  | ||||||
|     include:         |  | ||||||
|         - python: "3.5" |  | ||||||
|         - python: "3.6" |  | ||||||
|         - python: "3.7-dev" |  | ||||||
|         - env: |  | ||||||
|             - BUILD_DOCKER=1 |  | ||||||
|             # Variable to add to publish the Docker image: |  | ||||||
|             # * DOCKER_USERNAME |  | ||||||
|             # * DOCKER_PASSWORD, to be encrypted, use `travis encrypt DOCKER_PASSWORD=<password>` |  | ||||||
|           services: |  | ||||||
|             - docker |  | ||||||
|           before_install: |  | ||||||
|             - true |  | ||||||
|           install: |  | ||||||
|             - true |  | ||||||
|           script: |  | ||||||
|             - docker build --tag=the-paperless-project/paperless . |  | ||||||
|           after_success: |  | ||||||
|             - true |  | ||||||
|  |  | ||||||
| install: | install: | ||||||
|     - pip install --upgrade pip pipenv sphinx |   - pip install --upgrade pipenv | ||||||
|     - pipenv lock -r > requirements.txt |   - pipenv install --dev | ||||||
|     - pip install -r requirements.txt |  | ||||||
|  |  | ||||||
| script: | script: | ||||||
|     - cd src/ |   - cd src/ | ||||||
|     - pytest --cov |   - pipenv run pytest --cov | ||||||
|     - pycodestyle |   - pipenv run pycodestyle | ||||||
|     - sphinx-build -b html ../docs ../docs/_build -W |  | ||||||
|  |  | ||||||
| after_success: | after_success: | ||||||
|   - coveralls |   - pipenv run coveralls | ||||||
|  |  | ||||||
| deploy: |  | ||||||
|   - provider: script |  | ||||||
|     skip_cleanup: true |  | ||||||
|     script: ci/deploy-docker |  | ||||||
|     on: |  | ||||||
|       tags: true |  | ||||||
|       condition: '"${BUILD_DOCKER}" = 1' |  | ||||||
|   - provider: script |  | ||||||
|     skip_cleanup: true |  | ||||||
|     script: ci/deploy-docker |  | ||||||
|     on: |  | ||||||
|       branch: master |  | ||||||
|       condition: '"${BUILD_DOCKER}" = 1' |  | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ services: | |||||||
|       POSTGRES_PASSWORD: paperless |       POSTGRES_PASSWORD: paperless | ||||||
|  |  | ||||||
|   webserver: |   webserver: | ||||||
|     image: paperless-ng:latest |     image: jonaswinkler/paperless-ng:latest | ||||||
|     restart: always |     restart: always | ||||||
|     depends_on: |     depends_on: | ||||||
|       - db |       - db | ||||||
|   | |||||||
| @@ -70,6 +70,9 @@ def open_index(recreate=False): | |||||||
|     if exists_in(settings.INDEX_DIR) and not recreate: |     if exists_in(settings.INDEX_DIR) and not recreate: | ||||||
|         return open_dir(settings.INDEX_DIR) |         return open_dir(settings.INDEX_DIR) | ||||||
|     else: |     else: | ||||||
|  |         # TODO: this is not thread safe. If 2 instances try to create the index | ||||||
|  |         #  at the same time, this fails. This currently prevents parallel | ||||||
|  |         #  tests. | ||||||
|         return create_in(settings.INDEX_DIR, get_schema()) |         return create_in(settings.INDEX_DIR, get_schema()) | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -203,11 +203,11 @@ DATABASES = { | |||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
| # Always have sqlite available as a second option for management commands |  | ||||||
| # This is important when migrating to/from sqlite |  | ||||||
| DATABASES['sqlite'] = DATABASES['default'].copy() |  | ||||||
|  |  | ||||||
| if os.getenv("PAPERLESS_DBHOST"): | if os.getenv("PAPERLESS_DBHOST"): | ||||||
|  |     # Have sqlite available as a second option for management commands | ||||||
|  |     # This is important when migrating to/from sqlite | ||||||
|  |     DATABASES['sqlite'] = DATABASES['default'].copy() | ||||||
|  |  | ||||||
|     DATABASES["default"] = { |     DATABASES["default"] = { | ||||||
|         "ENGINE": "django.db.backends.postgresql_psycopg2", |         "ENGINE": "django.db.backends.postgresql_psycopg2", | ||||||
|         "HOST": os.getenv("PAPERLESS_DBHOST"), |         "HOST": os.getenv("PAPERLESS_DBHOST"), | ||||||
|   | |||||||
| @@ -4,7 +4,7 @@ exclude = migrations, paperless/settings.py, .tox | |||||||
|  |  | ||||||
| [tool:pytest] | [tool:pytest] | ||||||
| DJANGO_SETTINGS_MODULE=paperless.settings | DJANGO_SETTINGS_MODULE=paperless.settings | ||||||
| addopts = --pythonwarnings=all -n auto | addopts = --pythonwarnings=all | ||||||
| env = | env = | ||||||
|   PAPERLESS_PASSPHRASE=THISISNOTASECRET |   PAPERLESS_PASSPHRASE=THISISNOTASECRET | ||||||
|   PAPERLESS_SECRET=paperless |   PAPERLESS_SECRET=paperless | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jonas Winkler
					Jonas Winkler