Skip to content

Commit

Permalink
recover test coverage and codecov uploads for all isolation tests
Browse files Browse the repository at this point in the history
TODO: Test this further.
  • Loading branch information
pevogam committed Jan 29, 2025
1 parent a50fb08 commit d124131
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[run]
source = avocado_i2n
29 changes: 15 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,25 +62,26 @@ jobs:
- run: sleep 3
- name: Create some fake binaries to make vt-bootstrap happy
run: |
mkdir -p /tmp/dummy_bin
touch /tmp/dummy_bin/arping
touch /tmp/dummy_bin/tcpdump
chmod 777 /tmp/dummy_bin/*
echo "/tmp/dummy_bin" >> $GITHUB_PATH
mkdir -p /tmp/dummy_bin
touch /tmp/dummy_bin/arping
touch /tmp/dummy_bin/tcpdump
chmod 777 /tmp/dummy_bin/*
echo "/tmp/dummy_bin" >> $GITHUB_PATH
- name: Bootstrapping Avocado VT
run: avocado vt-bootstrap --vt-skip-verify-download-assets --yes-to-all
- name: Isolation tests using parallel avocado runner
# if later on we decide that unit tests are still more appropriate here just do
#run: make check
run: PYTHONPATH=:. avocado run --max-parallel-tasks=4 selftests/isolation/test_*
# TODO: coverage report with avocado runs ends in 0% or ~0%, perhaps due to avocado or its async testing
#run: PYTHONPATH=:. coverage run --append --source=avocado_i2n $(which avocado) run --nrunner-max-parallel-tasks=4 selftests/isolation/test_*
#- name: Collect all coverage
# run: coverage report -m
#- name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# verbose: true
run: PYTHONPATH=:. coverage run -m avocado run --max-parallel-tasks=4 selftests/isolation/test_*
- name: Collect all coverage
run: |
coverage combine
coverage report -m
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
- name: Cleaning up avocado(-vt) libs
run: |
rm -rf avocado-vt-libs
Expand Down

0 comments on commit d124131

Please sign in to comment.