From 5b0a7b2591d151a0763842836fedd1d484cfd1cb Mon Sep 17 00:00:00 2001 From: Daven Savoie Date: Sat, 4 Sep 2021 19:16:42 +0000 Subject: [PATCH 01/15] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 5fcf1b9..41738a5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,5 @@ hexathon~=0.0.1a8 websocket-client==0.57.0 potaahto~=0.0.1a1 chainlib==0.0.9a6 +chailib-eth==0.0.9a6 confini>=0.4.1a1,<0.5.0 From 60da2568178ec77eccd6383ecd960d24bcd5a332 Mon Sep 17 00:00:00 2001 From: Daven Savoie Date: Sat, 4 Sep 2021 19:18:54 +0000 Subject: [PATCH 02/15] Add new file --- .gitlab-ci.yml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..72351ee --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,41 @@ +stages: +- build +- test +#running the bash script in test + +build_and_push: + image: registry.gitlab.com/grassrootseconomics/cic-base-images:python-3.8.6-dev + stage: build + variables: + #CI_DEBUG_TRACE: "true" + CIC_PACKAGE_REGISTRY_PROJECT_ID: 27624814 + script: + #- python -m pip install --upgrade setuptools wheel pip twine semver + - python -m pip install --extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple --extra-index-url https://pip.grassrootseconomics.net:8433 install -r requirements.txt + - python setup.py sdist bdist_wheel + - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --skip-existing --repository-url ${CI_API_V4_URL}/projects/${CIC_PACKAGE_REGISTRY_PROJECT_ID}/packages/pypi dist/* + # Below are the built dependencies + #- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CIC_PACKAGE_REGISTRY_PROJECT_ID}/packages/pypi /tmp/wheelhouse/* + only: + - master + - daven/* + +tests: + image: registry.gitlab.com/grassrootseconomics/cic-base-images:python-3.8.6-dev + stage: test + variables: + #CI_DEBUG_TRACE: "true" + CIC_PACKAGE_REGISTRY_PROJECT_ID: 27624814 + script: + - ls + - python -m pip install --extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple --extra-index-url https://pip.grassrootseconomics.net:8433 install -r requirements.txt + - python -m pip freeze + - ls + - bash run_tests.sh + + only: + - master + - daven/* + +# rules: +# - if: $CI_PIPELINE_SOURCE == "merge_request_event" From 95190dda88a9964a24cc91f148c0a710e36151dd Mon Sep 17 00:00:00 2001 From: Daven Savoie Date: Sat, 4 Sep 2021 19:21:16 +0000 Subject: [PATCH 03/15] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 41738a5..2d6ac2b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,5 +4,5 @@ hexathon~=0.0.1a8 websocket-client==0.57.0 potaahto~=0.0.1a1 chainlib==0.0.9a6 -chailib-eth==0.0.9a6 +chainlib-eth==0.0.9a6 confini>=0.4.1a1,<0.5.0 From 8d3f4fda6eb3b50a16ef481075a2a9d4a45ce158 Mon Sep 17 00:00:00 2001 From: Daven Savoie Date: Sat, 4 Sep 2021 19:22:47 +0000 Subject: [PATCH 04/15] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 72351ee..c9827f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,7 +35,7 @@ tests: only: - master - - daven/* + - daven/0.0.0 # rules: # - if: $CI_PIPELINE_SOURCE == "merge_request_event" From 517c944bfae14e182f10e05e668c28e927502d5f Mon Sep 17 00:00:00 2001 From: Daven Savoie Date: Sat, 4 Sep 2021 19:25:23 +0000 Subject: [PATCH 05/15] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 2d6ac2b..869ef20 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,6 @@ pysha3==1.0.2 hexathon~=0.0.1a8 websocket-client==0.57.0 potaahto~=0.0.1a1 -chainlib==0.0.9a6 +chainlib==0.0.9a3 chainlib-eth==0.0.9a6 confini>=0.4.1a1,<0.5.0 From 4fe382151ebc460ec3927d121389fe352e62490d Mon Sep 17 00:00:00 2001 From: Daven Savoie Date: Mon, 13 Sep 2021 12:27:17 +0000 Subject: [PATCH 06/15] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 869ef20..8ad55d3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,3 +6,4 @@ potaahto~=0.0.1a1 chainlib==0.0.9a3 chainlib-eth==0.0.9a6 confini>=0.4.1a1,<0.5.0 +unittest From 2829f77b4e229aded4e49bb376112b53e830ecc5 Mon Sep 17 00:00:00 2001 From: Daven Savoie Date: Mon, 13 Sep 2021 12:32:07 +0000 Subject: [PATCH 07/15] Update requirements.txt --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8ad55d3..869ef20 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,4 +6,3 @@ potaahto~=0.0.1a1 chainlib==0.0.9a3 chainlib-eth==0.0.9a6 confini>=0.4.1a1,<0.5.0 -unittest From 6d80e31779c2eb6abb76d2f9b88866e0f4861a22 Mon Sep 17 00:00:00 2001 From: Daven Savoie Date: Mon, 13 Sep 2021 13:12:40 +0000 Subject: [PATCH 08/15] Update .gitlab-ci.yml --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c9827f4..ea9f2c8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,7 +31,8 @@ tests: - python -m pip install --extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple --extra-index-url https://pip.grassrootseconomics.net:8433 install -r requirements.txt - python -m pip freeze - ls - - bash run_tests.sh + - export PYTHONPATH=$PYTHONPATH:. + - PYTHONPATH=. run_tests.sh only: - master From 1be9efabf64a5051663186bd6a9539f5024ae729 Mon Sep 17 00:00:00 2001 From: Daven Savoie Date: Mon, 13 Sep 2021 13:16:25 +0000 Subject: [PATCH 09/15] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ea9f2c8..915326b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,7 +32,7 @@ tests: - python -m pip freeze - ls - export PYTHONPATH=$PYTHONPATH:. - - PYTHONPATH=. run_tests.sh + - PYTHONPATH=. bash run_tests.sh only: - master From 1cec7390408c078d46b2e7b50e6089c11bde8259 Mon Sep 17 00:00:00 2001 From: Daven Savoie Date: Mon, 13 Sep 2021 14:19:24 +0000 Subject: [PATCH 10/15] Update .gitlab-ci.yml --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 915326b..93d1266 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,6 +32,7 @@ tests: - python -m pip freeze - ls - export PYTHONPATH=$PYTHONPATH:. + - cp chainlib/tests/address.py /chainlib/ - PYTHONPATH=. bash run_tests.sh only: From 32aa31a3be426e125315ad891966680e408411db Mon Sep 17 00:00:00 2001 From: Daven Savoie Date: Mon, 13 Sep 2021 14:26:29 +0000 Subject: [PATCH 11/15] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 93d1266..20617c1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,7 +32,7 @@ tests: - python -m pip freeze - ls - export PYTHONPATH=$PYTHONPATH:. - - cp chainlib/tests/address.py /chainlib/ + - cp chainlib/tests/test_address.py / - PYTHONPATH=. bash run_tests.sh only: From 4ec8eefe7ce1ff9f969b135f0e7d0e787dd0ab54 Mon Sep 17 00:00:00 2001 From: nolash Date: Mon, 13 Sep 2021 16:38:11 +0200 Subject: [PATCH 12/15] Temporarily reinstate tests/base.py file --- tests/base.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/base.py diff --git a/tests/base.py b/tests/base.py new file mode 100644 index 0000000..e8e3a04 --- /dev/null +++ b/tests/base.py @@ -0,0 +1,12 @@ +import unittest + + +class TestBase(unittest.TestCase): + + + def setUp(self): + pass + + + def tearDown(self): + pass From e73924622c9bc405129f558546ca2dc5010d5393 Mon Sep 17 00:00:00 2001 From: nolash Date: Mon, 13 Sep 2021 16:42:00 +0200 Subject: [PATCH 13/15] Set default pythonpath --- run_tests.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/run_tests.sh b/run_tests.sh index 9ac346f..b8e4beb 100644 --- a/run_tests.sh +++ b/run_tests.sh @@ -1,10 +1,14 @@ #!/bin/bash +set -a set -e set -x -#export PYTHONPATH=${PYTHONPATH:.} +default_pythonpath=$PYTHONPATH:. +export PYTHONPATH=${default_pythonpath:-.} +>&2 echo using pythonpath $PYTHONPATH for f in `ls tests/*.py`; do python $f done set +x set +e +set +a From 1f57b9be337764a42792d4316c86e454dc5d7178 Mon Sep 17 00:00:00 2001 From: Daven Savoie Date: Mon, 13 Sep 2021 15:02:39 +0000 Subject: [PATCH 14/15] Update .gitlab-ci.yml --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 20617c1..915326b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,7 +32,6 @@ tests: - python -m pip freeze - ls - export PYTHONPATH=$PYTHONPATH:. - - cp chainlib/tests/test_address.py / - PYTHONPATH=. bash run_tests.sh only: From 2402ffc669f9c4db27d29cadb59c04069ad39859 Mon Sep 17 00:00:00 2001 From: Daven Savoie Date: Mon, 13 Sep 2021 15:10:32 +0000 Subject: [PATCH 15/15] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 915326b..bdc3806 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,7 +28,7 @@ tests: CIC_PACKAGE_REGISTRY_PROJECT_ID: 27624814 script: - ls - - python -m pip install --extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple --extra-index-url https://pip.grassrootseconomics.net:8433 install -r requirements.txt + - python -m pip install --extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple --extra-index-url https://pip.grassrootseconomics.net:8433 install -r requirements.txt -r test_requirements.txt - python -m pip freeze - ls - export PYTHONPATH=$PYTHONPATH:.