File tree 5 files changed +18
-14
lines changed
5 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 7
7
"pre_setup" : [" hatch env create" ],
8
8
"prepend_path" : " .venv/bin" ,
9
9
"acceptance_path" : " tests/integration" ,
10
- "test" : [
11
- " pytest -n 4 --cov src --cov-report=xml --timeout 30 tests/unit --durations 20"
12
- ]
10
+ "test" : []
13
11
}
14
12
}
Original file line number Diff line number Diff line change 42
42
- name : Install hatch
43
43
run : pip install hatch==1.9.4
44
44
45
- - name : Run integration tests
46
- uses : databrickslabs/sandbox/acceptance@acceptance/v0.4.2
45
+ - name : Run unit tests and generate test coverage report
46
+ run : make test
47
+
48
+ - name : Run integration tests and generate test coverage report
49
+ uses : databrickslabs/sandbox/acceptance@acceptance/v0.4.3
47
50
with :
48
51
vault_uri : ${{ secrets.VAULT_URI }}
49
52
timeout : 2h
52
55
ARM_CLIENT_ID : ${{ secrets.ARM_CLIENT_ID }}
53
56
ARM_TENANT_ID : ${{ secrets.ARM_TENANT_ID }}
54
57
58
+ # collects all coverage reports: coverage.xml from integration tests, coverage-unit.xml from unit tests
59
+ - name : Publish test coverage
60
+ uses : codecov/codecov-action@v5
61
+ with :
62
+ use_oidc : true
63
+
55
64
serverless_integration :
56
65
# Only run this job for PRs from branches on the main repository and not from forks.
57
66
# Workflows triggered by PRs from forks don't have access to the tool environment.
78
87
run : pip install hatch==1.9.4
79
88
80
89
- name : Run integration tests on serverless cluster
81
- uses : databrickslabs/sandbox/acceptance@acceptance/v0.4.2
90
+ uses : databrickslabs/sandbox/acceptance@acceptance/v0.4.3
82
91
with :
83
92
vault_uri : ${{ secrets.VAULT_URI }}
84
93
timeout : 2h
Original file line number Diff line number Diff line change 45
45
pip install hatch==1.9.4
46
46
make ci-test
47
47
48
- - name : Publish test coverage
49
- uses : codecov/codecov-action@v5
50
- with :
51
- use_oidc : true
52
-
53
48
fmt :
54
49
runs-on : ubuntu-latest
55
50
steps :
Original file line number Diff line number Diff line change @@ -78,9 +78,9 @@ python="3.10"
78
78
path = " .venv"
79
79
80
80
[tool .hatch .envs .default .scripts ]
81
- test = " pytest -n 10 --cov src --cov-report=xml --timeout 30 tests/unit --durations 20"
82
- coverage = " pytest -n 10 --cov src tests/ --timeout 480 -- cov-report=html --durations 20"
83
- integration = " pytest -n 10 --timeout 480 --cov src tests/integration --durations 20"
81
+ test = " pytest tests/unit/ -n 10 --cov --cov-report=xml:coverage-unit.xml --timeout 30 --durations 20"
82
+ coverage = " pytest tests/ -n 10 --cov -- cov-report=html --timeout 480 --durations 20"
83
+ integration = " pytest tests/integration/ -n 10 --cov --cov-report=xml --cov-config= tests/integration/.coveragerc --timeout 480 --durations 20"
84
84
fmt = [" black . --extend-exclude 'demos/'" ,
85
85
" ruff check . --fix" ,
86
86
" mypy . --exclude 'demos/*'" ,
Original file line number Diff line number Diff line change
1
+ [run]
2
+ source = src
You can’t perform that action at this time.
0 commit comments