diff --git a/explorer/puller/dev_requirements.txt b/explorer/puller/dev_requirements.txt new file mode 100644 index 0000000000..efa878a712 --- /dev/null +++ b/explorer/puller/dev_requirements.txt @@ -0,0 +1,4 @@ +cffi==1.15.1 +pytest==7.2.2 +pytest-aiohttp==1.0.4 +coverage>=6.3 diff --git a/explorer/puller/requirements.txt b/explorer/puller/requirements.txt new file mode 100644 index 0000000000..b9ac07539b --- /dev/null +++ b/explorer/puller/requirements.txt @@ -0,0 +1,4 @@ +aiohttp==3.8.4 +psycopg2-binary==2.9.6 +symbol-sdk-python==3.0.7 +zenlog==1.1 diff --git a/explorer/puller/scripts/ci/lint.sh b/explorer/puller/scripts/ci/lint.sh new file mode 120000 index 0000000000..727eaef44d --- /dev/null +++ b/explorer/puller/scripts/ci/lint.sh @@ -0,0 +1 @@ +../../../../linters/python/lint.sh \ No newline at end of file diff --git a/explorer/puller/scripts/ci/setup_lint.sh b/explorer/puller/scripts/ci/setup_lint.sh new file mode 100755 index 0000000000..d1ea7a28b9 --- /dev/null +++ b/explorer/puller/scripts/ci/setup_lint.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -ex + +python3 -m pip install -r "$(git rev-parse --show-toplevel)/linters/python/lint_requirements.txt" +python3 -m pip install -r requirements.txt +python3 -m pip install -r dev_requirements.txt diff --git a/explorer/puller/scripts/ci/test.sh b/explorer/puller/scripts/ci/test.sh new file mode 100755 index 0000000000..6a455ce814 --- /dev/null +++ b/explorer/puller/scripts/ci/test.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +set -ex + +TEST_RUNNER=$([ "$1" = "code-coverage" ] && echo "coverage run --append" || echo "python3") +${TEST_RUNNER} -m pytest --asyncio-mode=auto -v