From 534a42f619b8a7e3226ad7e67601bbaef6bd2f31 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 20 Sep 2018 21:35:02 -0700 Subject: add libsodium-dev as a dep --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 19719230..b4556a05 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,7 +14,7 @@ unified_test: before_script: - cargo install diesel_cli --version 1.3.1 - apt update -qy - - apt install -y python3-dev python3-pip python3-wheel libsnappy-dev + - apt install -y python3-dev python3-pip python3-wheel libsnappy-dev libsodium-dev - pip3 install pipenv - pipenv --version script: -- cgit v1.2.3 From e661263baab5ff791986aaa6cc5d4996b149d4ce Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 31 Dec 2018 17:40:31 -0800 Subject: add dummy key to gitlab CI env --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b4556a05..a0a67fa8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,6 +9,9 @@ unified_test: POSTGRES_PASSWORD: "fatcat_pw" DATABASE_URL: "postgres://fatcat_user:fatcat_pw@postgres/fatcat_test" TEST_DATABASE_URL: "postgres://fatcat_user:fatcat_pw@postgres/fatcat_test" + AUTH_LOCATION: "dev.fatcat.wiki" + AUTH_KEY_IDENT: "2018-12-31-dev" + AUTH_SECRET_KEY: "VQe8kdn8laZ3MArKAzOeWWNUQgM6IjduG2jwKnSWehQ=" services: - "postgres:11" before_script: -- cgit v1.2.3 From b0d46cb4c3a9922aba78cdc5cf70525d2ff21d84 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 8 Jan 2019 14:33:15 -0800 Subject: run basic CLI tests in CI --- .gitlab-ci.yml | 2 ++ python/tests/cli.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 python/tests/cli.sh (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a0a67fa8..6f90a20e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,8 +28,10 @@ unified_test: - cargo test -- --test-threads 1 - cargo run --bin fatcatd & - cd ../python + - cp env.example .env - pipenv install --dev --deploy - pipenv run pytest --cov + - pipenv run ./tests/cli.sh # Just errors - pipenv run pylint -E fatcat*.py fatcat_tools fatcat_web diff --git a/python/tests/cli.sh b/python/tests/cli.sh new file mode 100755 index 00000000..eba6d3a7 --- /dev/null +++ b/python/tests/cli.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +set -eu -o pipefail +set -x + +# This is a helper script to at least partially exersize the fatcat_*.py +# scripts. It expects to be run from the top-level directory, inside a 'pipenv +# shell' or 'pipenv run' invocation. + +./fatcat_export.py changelog --start 1 --end 10 - > /dev/null + +# no easy way to run this without harvest a whole day (at the moment) +./fatcat_harvest.py crossref -h + +./fatcat_import.py crossref tests/files/crossref-works.2018-01-21.badsample.json tests/files/ISSN-to-ISSN-L.snip.txt +./fatcat_import.py orcid tests/files/0000-0001-8254-7103.json +./fatcat_import.py issn tests/files/journal_extra_metadata.snip.csv +./fatcat_import.py matched tests/files/matched_sample.json +./fatcat_import.py matched tests/files/example_matched.json +./fatcat_import.py grobid-metadata tests/files/example_grobid_metadata_lines.tsv + +./fatcat_webface.py -h +./fatcat_worker.py -h + +set +x +echo "Done running CLI examples (SUCCESS)" -- cgit v1.2.3 From 413968810ce470aded05e0d3519601ae6922c284 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 8 Jan 2019 15:52:51 -0800 Subject: have rust rests use env.example (not CI-specific vars) --- .gitlab-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6f90a20e..ffd2947f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,9 +9,6 @@ unified_test: POSTGRES_PASSWORD: "fatcat_pw" DATABASE_URL: "postgres://fatcat_user:fatcat_pw@postgres/fatcat_test" TEST_DATABASE_URL: "postgres://fatcat_user:fatcat_pw@postgres/fatcat_test" - AUTH_LOCATION: "dev.fatcat.wiki" - AUTH_KEY_IDENT: "2018-12-31-dev" - AUTH_SECRET_KEY: "VQe8kdn8laZ3MArKAzOeWWNUQgM6IjduG2jwKnSWehQ=" services: - "postgres:11" before_script: @@ -23,6 +20,7 @@ unified_test: script: - rustc --version && cargo --version && diesel --version - cd rust + - cp env.example .env - diesel database reset && diesel migration run - cargo build - cargo test -- --test-threads 1 -- cgit v1.2.3