Skip to content

Commit 6577114

Browse files
committed
added coverage action
1 parent 1aa105a commit 6577114

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/mindsdb_python_sdk.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,32 @@ jobs:
3939
CLOUD_TEST_EMAIL: ${{ secrets.CLOUD_TEST_EMAIL }}
4040
CLOUD_TEST_PASSWORD: ${{ secrets.CLOUD_TEST_PASSWORD }}
4141

42+
coverage:
43+
needs: test
44+
if: github.ref != 'refs/heads/stable'
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v3
48+
- name: Set up Python 3.8
49+
uses: actions/setup-python@v2
50+
with:
51+
python-version: 3.8
52+
53+
- name: Install dependencies
54+
run: |
55+
python -m pip install --upgrade pip
56+
pip install flake8 pytest pytest-cov
57+
pip install -r requirements.txt
58+
59+
- name: Build coverage file
60+
run: |
61+
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=mindsdb_sql tests/ | tee pytest-coverage.txt
62+
63+
- name: Pytest coverage comment
64+
uses: MishaKav/pytest-coverage-comment@main
65+
with:
66+
pytest-coverage-path: ./pytest-coverage.txt
67+
junitxml-path: ./pytest.xml
4268

4369
deploy:
4470
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)