Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci/nightly: Run parsec-mock for coverage tests #113

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 15 additions & 0 deletions tests/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Loading