Skip to content

Commit 4a1b496

Browse files
tgonzalezorlandoarmgowthamsk-arm
authored andcommitted
ci/nightly: Run parsec-mock for coverage tests
This commit fixes nightly issues: Certain tests ran by coverage.sh require a mock service to have started before the tests are actually ran. * Clone and start the parsec-mock service for coverage testing. Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
1 parent 03c9448 commit 4a1b496

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

.github/workflows/nightly.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,10 @@ jobs:
5252
with:
5353
ref: "${{ github.event.inputs.rev }}"
5454
- name: Execute tarpaulin
55-
run: ./tests/coverage.sh
55+
run: |
56+
curl -s -N -L https://github.com/parallaxsecond/parsec-mock/archive/refs/tags/0.1.1.tar.gz | tar xz
57+
cd parsec-mock-0.1.1/
58+
python -m pip install --upgrade pip
59+
pip install -r requirements.txt
60+
cd ..
61+
./tests/coverage.sh

tests/coverage.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ set -euf -o pipefail
77

88
cargo install cargo-tarpaulin
99

10+
######################
11+
# Start Mock Service #
12+
######################
13+
CURRENT_PATH=$(pwd)
14+
cd parsec-mock-0.1.1
15+
python parsec_mock/parsec_mock.py --parsec-socket $CURRENT_PATH/parsec_mock.sock &
16+
while [[ ! -S $CURRENT_PATH/parsec_mock.sock ]]; do
17+
sleep 5
18+
done
19+
cd ..
20+
export PARSEC_SERVICE_ENDPOINT="unix://$CURRENT_PATH/parsec_mock.sock"
21+
22+
######################
23+
# Run tests #
24+
######################
1025
cargo tarpaulin --tests --out Xml --exclude-files="src/core/testing/*"
1126

1227
bash <(curl -s https://codecov.io/bash)

0 commit comments

Comments
 (0)