Move to UV #544
This file contains hidden or 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 | |
| permissions: | |
| checks: write | |
| pull-requests: write | |
| id-token: write | |
| contents: read | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ] | |
| env: | |
| PYTHON: ${{ matrix.python-version }} | |
| steps: | |
| - name: Azure login | |
| uses: azure/login@v2 | |
| with: | |
| client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| - uses: actions/checkout@v4 | |
| - name: Install uv and set the python version | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| - name: Install Poe | |
| run: uv tool install poethepoet | |
| - name: EtoE Test with pytest | |
| env: | |
| 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: poe test --ci | |
| # todo: re-enable on a different PR | |
| # - name: "Run Ruff Formatter" | |
| # id: ruff-formatter | |
| # uses: astral-sh/ruff-action@v3 | |
| # with: | |
| # args: "format --diff" | |
| # | |
| # - name: "Run Ruff Linter" | |
| # run: ruff check --diff | |
| - name: Upload Unit Test Results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Unit Test Results (Python ${{ matrix.python-version }}) | |
| path: pytest*.xml | |
| publish-test-results: | |
| name: "Publish Unit Tests Results" | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: always() | |
| permissions: | |
| checks: write | |
| pull-requests: write | |
| steps: | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Publish Unit Test Results | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| with: | |
| files: artifacts/**/*.xml |