-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add different chain for tests Add tests infrastructure Some refactor
- Loading branch information
Showing
35 changed files
with
884 additions
and
387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
machine: true | ||
steps: | ||
- checkout | ||
- run: docker build --tag=sbrunner/scan-to-paperless . | ||
- run: docker build --tag=tests tests | ||
- run: docker run --rm tests pylint process | ||
- run: docker run --rm tests python3 -m pyflakes . | ||
- run: docker run --rm tests bandit -r process | ||
- run: docker run --rm tests mypy --ignore-missing-imports --disallow-untyped-defs --strict-optional --follow-imports skip /opt | ||
- run: docker run --rm tests codespell --check-filenames --skip=./Deskew/*,*.pyc,*.png | ||
- run: docker run --rm --env=PYTHONPATH=/opt/ --volume=`pwd`/results:/results tests bash -c 'mv /opt/process /opt/process.py; cd /tests; pytest --verbose --color=yes .' | ||
- store_artifacts: | ||
path: results | ||
destination: tests-results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!process | ||
!requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/results/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tests/.pylintrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
ALTER TABLE documents_correspondent ALTER COLUMN name TYPE text; | ||
ALTER TABLE documents_correspondent ALTER COLUMN slug TYPE text; | ||
ALTER TABLE documents_correspondent ALTER COLUMN match TYPE text; | ||
ALTER TABLE documents_tag ALTER COLUMN name TYPE text; | ||
ALTER TABLE documents_tag ALTER COLUMN slug TYPE text; | ||
ALTER TABLE documents_tag ALTER COLUMN match TYPE text; | ||
ALTER TABLE documents_document ALTER COLUMN title TYPE text; | ||
ALTER TABLE documents_document ALTER COLUMN title TYPE text; | ||
|
||
DROP INDEX documents_document_content_aa150741; | ||
DROP INDEX documents_document_content_aa150741_like; | ||
|
||
ALTER TABLE django_admin_log ALTER COLUMN object_repr TYPE text; | ||
|
||
CREATE EXTENSION pg_trgm; | ||
DROP INDEX documents_document_content; | ||
CREATE INDEX documents_document_content ON documents_document USING GIN (upper(content) gin_trgm_ops); | ||
CREATE INDEX documents_correspondent_name ON documents_correspondent USING GIN (upper(name) gin_trgm_ops); | ||
CREATE INDEX documents_document_title ON documents_document USING GIN (upper(title) gin_trgm_ops); | ||
CREATE INDEX documents_tag_name ON documents_tag USING GIN (upper(name) gin_trgm_ops); |
Oops, something went wrong.