Skip to content

Commit 3a71a3f

Browse files
committed
Merged PR 5190: Feat: Adding coveragerc & pipeline build before pytest
#### AI description (iteration 1) #### PR Classification Documentation #### PR Summary This pull request adds a basic README file with build status badges and project information. - Added `README.md` with project description, build status badges, project structure, build instructions, test instructions, contribution guidelines, and license information. Related work items: #33372
1 parent 6c179d9 commit 3a71a3f

4 files changed

Lines changed: 19 additions & 92 deletions

File tree

.coveragerc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[run]
2+
omit =
3+
mssql_python/testing_ddbc_bindings.py
4+
5+
[report]
6+
# Add any report-specific settings here, if needed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ This repository contains the source code for the MSSQL-Python project, which pro
44

55
## Build Status (`main`)
66

7-
### Python Tests Pipeline
7+
### Python Tests
88
[![Build Status](https://sqlclientdrivers.visualstudio.com/mssql-python/_apis/build/status%2FPython%20Tests?branchName=main)](https://sqlclientdrivers.visualstudio.com/mssql-python/_build/latest?definitionId=2024&branchName=main)
99

10-
### PYD Build Pipeline
10+
### PYD Build
1111
[![Build Status](https://sqlclientdrivers.visualstudio.com/mssql-python/_apis/build/status%2FBuild%20DDBC%20Bindings%20PYD?branchName=main)](https://sqlclientdrivers.visualstudio.com/mssql-python/_build/latest?definitionId=2041&branchName=main)
1212

13+
1314
## Requirements
1415

1516
To build and run this project, you need the following:

pybuild-pipeline.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

test-pipeline.yml

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,7 @@
1-
trigger:
2-
branches:
3-
include:
4-
- '*' # Trigger on any branch
5-
paths:
6-
# Excluding below files since they are static and do not need to trigger the pipeline.
7-
exclude:
8-
- README.md
9-
- mssql_python/pybind/README.md
10-
11-
pr:
12-
branches:
13-
include:
14-
- main # Trigger on PRs to main branch
15-
paths:
16-
# Excluding the files that are static and do not need to trigger the pipeline.
17-
exclude:
18-
- README.md
19-
- mssql_python/pybind/README.md
1+
name: test-pipeline
202

213
jobs:
224
- job: PytestOnWindows
23-
245
pool:
256
vmImage: 'windows-latest'
267

@@ -38,22 +19,28 @@ jobs:
3819
pip install -r requirements.txt
3920
displayName: 'Install dependencies'
4021
41-
# Build before testing for now - @gaurav to change this to use the latest PYD file from the build artifacts
4222
- script: |
4323
cd mssql_python\pybind
4424
mkdir build
4525
cd build
4626
cmake -DPython3_EXECUTABLE="python3" -DCMAKE_BUILD_TYPE=Debug ..
4727
cmake --build . --config Debug
4828
copy Debug\ddbc_bindings.pyd ..\..\ddbc_bindings.pyd
49-
displayName: 'Build and copy .pyd file'
29+
displayName: 'Build .pyd file'
5030
5131
- script: |
5232
python -m pytest -v --junitxml=test-results.xml --cov=. --cov-report=xml --capture=tee-sys --cache-clear
5333
displayName: 'Run tests with coverage'
5434
env:
5535
DB_CONNECTION_STRING: $(DB_CONNECTION_STRING)
56-
36+
37+
- task: PublishBuildArtifacts@1
38+
inputs:
39+
PathtoPublish: 'mssql_python/ddbc_bindings.pyd'
40+
ArtifactName: 'ddbc_bindings'
41+
publishLocation: 'Container'
42+
displayName: 'Publish pyd file as artifact'
43+
5744
- task: PublishTestResults@2
5845
condition: succeededOrFailed()
5946
inputs:

0 commit comments

Comments
 (0)