Skip to content

Commit b1cb05d

Browse files
Merge pull request #74 from mindsdb/coverage-tests
Coverage tests
2 parents 1aa105a + ed24f34 commit b1cb05d

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.github/workflows/mindsdb_python_sdk.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
os: [ubuntu-latest]
16-
python-version: [3.7,3.8]
16+
python-version: [3.7,3.8,3.9]
1717
steps:
1818
- uses: actions/checkout@v2
1919
- name: Set up Python ${{ matrix.python-version }}
@@ -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_sdk 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)