-
Notifications
You must be signed in to change notification settings - Fork 106
77 lines (68 loc) · 2.53 KB
/
build.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# This workflow will install the dependencies, run tests and lint every push
name: Python package
on:
push:
branches: [ master ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
env:
PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip --user
pip install -r dev_requirements.txt --user
pip install pytest-cov --user
pip install ./azure-kusto-data[aio,pandas] ./azure-kusto-ingest[aio,pandas] --user
pip freeze
- uses: psf/black@stable
with:
options: "--check --diff --line-length 160"
version: "23.3.0"
- name: EtoE Test with pytest
env:
APP_ID: ${{ secrets.APP_ID }}
APP_KEY: ${{ secrets.APP_KEY }}
AUTH_ID: ${{ secrets.AUTH_ID }}
TEST_DATABASE: ${{ secrets.TEST_DATABASE }}
TEST_BLOB: ${{ secrets.TEST_BLOB }}
ENGINE_CONNECTION_STRING: ${{ secrets.ENGINE_CONNECTION_STRING }}
APPLICATION_INSIGHTS_ENGINE_CONNECTION_STRING: https://ade.applicationinsights.io/subscriptions/12534eb3-8109-4d84-83ad-576c0d5e1d06/resourcegroups/clients_e2e_test/providers/microsoft.insights/components/kusto-e2e-app-insights
APPLICATION_INSIGHTS_TEST_DATABASE: kusto-e2e-app-insights
run: |
pytest -v . --junit-xml pytest.xml --cov=/home/runner/.local/lib/python${{ matrix.python-version }}/site-packages/azure/kusto --cov-report=xml:coverage2.xml
- name: Upload Unit Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: Unit Test Results (Python ${{ matrix.python-version }})
path: pytest*.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
env_vars: PYTHON
publish-test-results:
name: "Publish Unit Tests Results"
needs: build
runs-on: ubuntu-latest
if: always()
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: artifacts/**/*.xml