Skip to content

Commit 58451ca

Browse files
committed
unit tests
1 parent 7f134d2 commit 58451ca

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

.github/workflows/test.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: run unit tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
test:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, windows-latest]
14+
python-version: [3.8,3.9,'3.10']
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -r requirements_test.txt
25+
pip install pytest-cov
26+
pip install --no-cache-dir -e .[test]
27+
- name: Run unit tests
28+
run: pytest -v
29+
shell: bash
30+
31+
32+
coverage:
33+
needs: test
34+
runs-on: ubuntu-latest
35+
permissions:
36+
pull-requests: write
37+
steps:
38+
- uses: actions/checkout@v3
39+
- name: Set up Python 3.8
40+
uses: actions/setup-python@v2
41+
with:
42+
python-version: 3.8
43+
44+
- name: Install dependencies
45+
run: |
46+
python -m pip install --upgrade pip
47+
pip install flake8 pytest pytest-cov
48+
pip install -r requirements_test.txt
49+
50+
- name: Build coverage file
51+
run: |
52+
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=mindsdb_sql tests/ | tee pytest-coverage.txt
53+
54+
- name: Pytest coverage comment
55+
uses: MishaKav/pytest-coverage-comment@main
56+
with:
57+
pytest-coverage-path: ./pytest-coverage.txt
58+
junitxml-path: ./pytest.xml

mindsdb_sql_parser/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
__github__ = 'https://github.com/mindsdb/mindsdb_sql_parser'
88
__pypi__ = 'https://pypi.org/project/mindsdb_sql_parser'
99
__license__ = 'MIT'
10-
__copyright__ = 'Copyright 2021- mindsdb'
10+
__copyright__ = 'Copyright 2024- mindsdb'

0 commit comments

Comments
 (0)