Skip to content

Commit

Permalink
chore: fix code coverage report
Browse files Browse the repository at this point in the history
RHINENG-7698
  • Loading branch information
psegedy committed Jan 19, 2024
1 parent 0cb451e commit dc59567
Showing 1 changed file with 32 additions and 10 deletions.
42 changes: 32 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,23 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup docker
run: |
docker-compose --version
docker compose version
sudo apt-get update
sudo apt-get -y install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-compose-plugin
docker compose version
- name: Install dependencies
run: |
python -m pip install --upgrade pip codecov flake8
Expand All @@ -35,25 +52,30 @@ jobs:
flake8 vmaas/
- name: Run container
run: |
docker-compose -f docker-compose.test.yml -f docker-compose.test.listen.yml up -d --build test
docker compose -f docker-compose.test.yml -f docker-compose.test.listen.yml up -d --build test
- name: Check dependencies
run: |
docker-compose -f docker-compose.test.yml exec -T test ./scripts/check_deps_versions.sh --exit-code-from
docker compose -f docker-compose.test.yml exec -T test ./scripts/check_deps_versions.sh --exit-code-from
- name: Validate dashboards
run: |
docker-compose -f docker-compose.test.yml exec -T test ./scripts/validate_dashboards.py ./monitoring/grafana/dashboards/ --exit-code-from
docker compose -f docker-compose.test.yml exec -T test ./scripts/validate_dashboards.py ./monitoring/grafana/dashboards/ --exit-code-from
- name: Wait for services and upgrade DB
run: |
docker-compose -f docker-compose.test.yml exec -T test python3 -m vmaas.common.wait_for_services python3 -m vmaas.reposcan.database.upgrade --exit-code-from
docker compose -f docker-compose.test.yml exec -T test python3 -m vmaas.common.wait_for_services python3 -m vmaas.reposcan.database.upgrade --exit-code-from
- name: exec common tests
run: |
docker-compose -f docker-compose.test.yml exec -T test ./run_tests.sh vmaas/common --exit-code-from
docker compose -f docker-compose.test.yml exec -T test ./run_tests.sh vmaas/common --exit-code-from
docker compose -f docker-compose.test.yml cp test:/vmaas/vmaas/common/coverage.xml ./coverage_common.xml
- name: exec reposcan tests
run: |
docker-compose -f docker-compose.test.yml exec -T test ./run_tests.sh vmaas/reposcan --exit-code-from
docker compose -f docker-compose.test.yml exec -T test ./run_tests.sh vmaas/reposcan --exit-code-from
docker compose -f docker-compose.test.yml cp test:/vmaas/vmaas/reposcan/coverage.xml ./coverage_reposcan.xml
- name: exec webapp tests
run: |
docker-compose -f docker-compose.test.yml exec -T test ./run_tests.sh vmaas/webapp --exit-code-from
- name: exec codecov
run: |
docker-compose -f docker-compose.test.yml exec -T test bash -c "bash <(curl -s https://codecov.io/bash)" --exit-code-from
docker compose -f docker-compose.test.yml exec -T test ./run_tests.sh vmaas/webapp --exit-code-from
docker compose -f docker-compose.test.yml cp test:/vmaas/vmaas/webapp/coverage.xml ./coverage_webapp.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage_common.xml,./coverage_reposcan.xml,./coverage_webapp.xml
verbose: true

0 comments on commit dc59567

Please sign in to comment.