File tree Expand file tree Collapse file tree 4 files changed +69
-7
lines changed
Expand file tree Collapse file tree 4 files changed +69
-7
lines changed Original file line number Diff line number Diff line change 1+ name : Code coverage
2+
3+ env :
4+ GH_TOKEN : ${{ secrets.GH_TOKEN }}
5+ MICROSOFT_EMAIL :
[email protected] 6+ USER_NAME : Gurkan Indibay
7+ MAIN_BRANCH : all-citus
8+ DB_USER_NAME : ${{ secrets.STATS_DB_USER_NAME }}
9+ DB_PASSWORD : ${{ secrets.STATS_DB_PASSWORD }}
10+ DB_HOST_AND_PORT : ${{ secrets.STATS_DB_HOST_AND_PORT }}
11+ DB_NAME : ${{ secrets.STATS_DB_NAME }}
12+ PACKAGE_CLOUD_API_TOKEN : ${{ secrets.PACKAGE_CLOUD_API_TOKEN }}
13+ PACKAGE_CLOUD_ADMIN_API_TOKEN : ${{ secrets.PACKAGE_CLOUD_ADMIN_API_TOKEN }}
14+ GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
15+ PACKAGING_PASSPHRASE : ${{ secrets.PACKAGING_PASSPHRASE }}
16+ PLATFORM : el/8
17+ on :
18+ push :
19+ branches :
20+ - " **"
21+
22+ workflow_dispatch :
23+
24+ jobs :
25+ make-install :
26+ runs-on : ubuntu-latest
27+
28+ steps :
29+ - name : Check out repository
30+ uses : actions/checkout@v2
31+ - name : Install all scripts
32+ run : make && sudo make install
33+
34+ code_coverage :
35+ runs-on : ubuntu-latest
36+
37+ steps :
38+ - name : Checkout repository
39+ uses : actions/checkout@v2
40+ with :
41+ fetch-depth : 0
42+
43+ - name : Define git credentials
44+ run : git config --global user.email "${MICROSOFT_EMAIL}"&& git config --global user.name "${USER_NAME}"
45+
46+ - name : Install package dependencies
47+ run : sudo apt-get update && sudo apt-get install libcurl4-openssl-dev libssl-dev python3-testresources
48+
49+ - name : Install python requirements
50+ run : python -m pip install -r packaging_automation/requirements.txt
51+
52+ - name : Run code coverage
53+ run : python -m pytest --cov=packaging_automation packaging_automation/tests/
Original file line number Diff line number Diff line change @@ -45,19 +45,19 @@ jobs:
4545 run : python -m prospector
4646
4747 - name : Unit tests for "Common tools"
48- run : python -m pytest -q packaging_automation/tests/test_common_tool_methods.py
48+ run : coverage run -m pytest -q packaging_automation/tests/test_common_tool_methods.py
4949
5050 - name : Unit tests for "Update Package Properties"
51- run : python -m pytest -q packaging_automation/tests/test_update_package_properties.py
51+ run : coverage run --cov-append -m pytest -q packaging_automation/tests/test_update_package_properties.py
5252
5353 - name : Unit tests for "Prepare Release"
54- run : python -m pytest -q packaging_automation/tests/test_prepare_release.py
54+ run : coverage run --cov-append -m pytest -q packaging_automation/tests/test_prepare_release.py
5555
5656 - name : Unit tests for "Update Docker"
57- run : python -m pytest -q packaging_automation/tests/test_update_docker.py
57+ run : coverage run --cov-append -m pytest -q packaging_automation/tests/test_update_docker.py
5858
5959 - name : Unit tests for "Update Pgxn"
60- run : python -m pytest -q packaging_automation/tests/test_update_pgxn.py
60+ run : coverage run --cov-append -m pytest -q packaging_automation/tests/test_update_pgxn.py
6161
6262 - name : Packaging Warning Handler
63- run : python -m pytest -q packaging_automation/tests/test_packaging_warning_handler.py
63+ run : coverage run --cov-append -m pytest -q packaging_automation/tests/test_packaging_warning_handler.py
Original file line number Diff line number Diff line change @@ -16,3 +16,4 @@ urllib3
1616wheel
1717python-dotenv
1818prospector[with_everything]
19+ pytest-cov
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ cffi==1.14.5
2020 # via pynacl
2121chardet == 4.0.0
2222 # via requests
23+ coverage [toml ]== 6.0.2
24+ # via pytest-cov
2325deprecated == 1.2.12
2426 # via pygithub
2527docker == 5.0.0
@@ -130,8 +132,12 @@ pyparsing==2.4.7
130132 # via packaging
131133pyroma == 3.2
132134 # via prospector
133- pytest == 6.2.4
135+ pytest-cov == 3.0.0
134136 # via -r requirements.in
137+ pytest == 6.2.4
138+ # via
139+ # -r requirements.in
140+ # pytest-cov
135141python-dotenv == 0.19.0
136142 # via -r requirements.in
137143python-gnupg == 0.4.7
@@ -173,6 +179,8 @@ toml==0.10.2
173179 # pylint
174180 # pytest
175181 # vulture
182+ tomli == 1.2.1
183+ # via coverage
176184typing-extensions == 3.10.0.2
177185 # via mypy
178186urllib3 == 1.26.6
You can’t perform that action at this time.
0 commit comments