Rank storage account success rate to improve stability. #159
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |