Skip to content

Commit

Permalink
[DOP-13277] Collect coverage results
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-pedchenko committed Mar 7, 2024
1 parent 960c60b commit f5179a9
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 12 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/collect_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,34 @@ jobs:
tests:
name: Collect coverage
runs-on: ubuntu-latest
needs: [hdfs-tests, hive-tests, oracle-tests, unit-tests]

env:
POETRY_VERSION: 1.6.1

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install poetry ${{ env.POETRY_VERSION }}
uses: snok/install-poetry@v1
with:
version: ${{ env.POETRY_VERSION }}

- name: Cache poetry
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-collect-coverage-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-collect-coverage-${{ hashFiles('**/poetry.lock') }}
${{ runner.os }}-python-${{ env.DEFAULT_PYTHON }}-collect-coverage-
${{ runner.os }}-python
${{ runner.os }}
- name: Install dependencies
run: |
poetry install --no-root --with test
- name: Generate coverate reports
run: ./combine_coverage.sh
2 changes: 1 addition & 1 deletion .github/workflows/hdfs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
# Tests for the backend are run on the worker.
# Backend and worker on the same container.
run: |
docker compose -f ./docker-compose.test.yml exec -T worker python -m coverage run pytest -vvv -s -m hdfs
docker compose -f ./docker-compose.test.yml exec -T worker python -m coverage run -m pytest -vvv -s -m hdfs
env:
COMPOSE_PROJECT_NAME: ${{ github.run_id }}-syncmaster

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hive-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
# Tests for the backend are run on the worker.
# Backend and worker on the same container.
run: |
docker compose -f ./docker-compose.test.yml exec -T worker python -m coverage run pytest -vvv -s -m hive
docker compose -f ./docker-compose.test.yml exec -T worker python -m coverage run -m pytest -vvv -s -m hive
env:
COMPOSE_PROJECT_NAME: ${{ github.run_id }}-syncmaster

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/oracle-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
# Tests for the backend are run on the worker.
# Backend and worker on the same container.
run: |
docker compose -f ./docker-compose.test.yml exec -T worker python -m coverage run pytest -vvv -s -m oracle
docker compose -f ./docker-compose.test.yml exec -T worker python -m coverage run -m pytest -vvv -s -m oracle
env:
COMPOSE_PROJECT_NAME: ${{ github.run_id }}-syncmaster

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/s3-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
# Tests for the backend are run on the worker.
# Backend and worker on the same container.
run: |
docker compose -f ./docker-compose.test.yml exec -T worker python -m coverage run pytest -vvv -s -m s3
docker compose -f ./docker-compose.test.yml exec -T worker python -m coverage run -m pytest -vvv -s -m s3
env:
COMPOSE_PROJECT_NAME: ${{ github.run_id }}-syncmaster

Expand Down
8 changes: 0 additions & 8 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ services:
depends_on:
- db
- rabbitmq
- test-oracle
- test-postgres
- test-hive
- test-s3
volumes:
- ./cached_jars:/root/.ivy2
- ./reports:/syncmaster/reports
Expand All @@ -47,10 +43,6 @@ services:
depends_on:
- db
- rabbitmq
- test-oracle
- test-postgres
- test-hive
- test-s3
volumes:
- ./cached_jars:/root/.ivy2
- ./reports:/syncmaster/reports
Expand Down

0 comments on commit f5179a9

Please sign in to comment.