Skip to content

Commit 618822c

Browse files
committed
ci run with coverage report
1 parent 16b6024 commit 618822c

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

.github/workflows/python-ci.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ jobs:
6464
run: make install-dependencies
6565
- name: Run linters
6666
run: make lint
67-
- name: Run unit tests
68-
run: make test
67+
- name: Run unit tests with coverage
68+
run: COVERAGE=1 make test
69+
- name: Generate coverage report
70+
run: make coverage-report
6971

7072
integration-test:
7173
runs-on: ubuntu-22.04
@@ -80,26 +82,29 @@ jobs:
8082
- name: Install
8183
run: make install
8284

83-
- name: Run integration tests
84-
run: make test-integration
85+
- name: Run integration tests with coverage
86+
run: COVERAGE=1 make test-integration
8587
- name: Show debug logs
8688
if: ${{ failure() }}
8789
run: docker compose -f dev/docker-compose.yml logs
8890

89-
- name: Run s3 integration tests
90-
run: make test-s3
91+
- name: Run s3 integration tests with coverage
92+
run: COVERAGE=1 make test-s3
9193
- name: Show debug logs
9294
if: ${{ failure() }}
9395
run: docker compose -f dev/docker-compose.yml logs
9496

95-
- name: Run adls integration tests
96-
run: make test-adls
97+
- name: Run adls integration tests with coverage
98+
run: COVERAGE=1 make test-adls
9799
- name: Show debug logs
98100
if: ${{ failure() }}
99101
run: docker compose -f dev/docker-compose-azurite.yml logs
100102

101-
- name: Run gcs integration tests
102-
run: make test-gcs
103+
- name: Run gcs integration tests with coverage
104+
run: COVERAGE=1 make test-gcs
103105
- name: Show debug logs
104106
if: ${{ failure() }}
105107
run: docker compose -f dev/docker-compose-gcs-server.yml logs
108+
109+
- name: Generate coverage report
110+
run: make coverage-report

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ test-gcs: ## Run tests marked with @pytest.mark.gcs
116116
$(TEST_RUNNER) pytest tests/ -m gcs $(PYTEST_ARGS)
117117

118118
test-coverage: COVERAGE=1
119-
test-coverage: test test-integration test-s3 test-adls test-gcs ## Run all tests with coverage
119+
test-coverage: test test-integration test-s3 test-adls test-gcs coverage-report ## Run all tests with coverage and report
120+
121+
coverage-report: ## Combine and report coverage
120122
poetry run coverage combine
121123
poetry run coverage report -m --fail-under=90
122124
poetry run coverage html

0 commit comments

Comments
 (0)