diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index bca49d7..ae61423 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -52,4 +52,10 @@ jobs: with: ref: "${{ github.event.inputs.rev }}" - name: Execute tarpaulin - run: ./tests/coverage.sh + run: | + curl -s -N -L https://github.com/parallaxsecond/parsec-mock/archive/refs/tags/0.1.1.tar.gz | tar xz + cd parsec-mock-0.1.1/ + python -m pip install --upgrade pip + pip install -r requirements.txt + cd .. + ./tests/coverage.sh diff --git a/tests/coverage.sh b/tests/coverage.sh index 1cf6872..4da16c5 100755 --- a/tests/coverage.sh +++ b/tests/coverage.sh @@ -7,6 +7,21 @@ set -euf -o pipefail cargo install cargo-tarpaulin +###################### +# Start Mock Service # +###################### +CURRENT_PATH=$(pwd) +cd parsec-mock-0.1.1 +python parsec_mock/parsec_mock.py --parsec-socket $CURRENT_PATH/parsec_mock.sock & +while [[ ! -S $CURRENT_PATH/parsec_mock.sock ]]; do + sleep 5 +done +cd .. +export PARSEC_SERVICE_ENDPOINT="unix://$CURRENT_PATH/parsec_mock.sock" + +###################### +# Run tests # +###################### cargo tarpaulin --tests --out Xml --exclude-files="src/core/testing/*" bash <(curl -s https://codecov.io/bash)