-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (46 loc) · 1.41 KB
/
pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: pipeline
on: [push]
jobs:
test-job:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
services:
clickhouse:
image: yandex/clickhouse-server
ports:
- 9000:9000
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings
flake8 . --count --exit-zero --statistics
- name: Test with pytest
run: |
pytest -v --cov=./mcbackend --cov-report xml --cov-report term-missing mcbackend/
- name: Upload coverage
uses: codecov/codecov-action@v4
if: matrix.python-version == 3.11
with:
file: ./coverage.xml
fail_ci_if_error: false
- name: Test Wheel install and import
run: |
python setup.py bdist_wheel
cd dist
pip install mcbackend*.whl
python -c "import mcbackend; print(mcbackend.__version__)"