Repository navigation
chore(deps-dev): bump duckdb from 2.0.0 to 2.0.1 #110242
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
| # Python unit tests | |
| name: Python-Unit | |
| # Least-privilege default for GITHUB_TOKEN. Jobs that need more (e.g. OIDC for | |
| # codecov uploads) opt in via their own job-level `permissions:` block. | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| - "[0-9].[0-9]*" | |
| pull_request: | |
| types: [synchronize, opened, reopened, ready_for_review] | |
| # cancel previous workflow jobs for PRs | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-26.04 | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| outputs: | |
| python: ${{ steps.check.outputs.python }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Check for file changes | |
| id: check | |
| uses: $/.github/actions/change-detector/ | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| unit-tests: | |
| needs: changes | |
| if: needs.changes.outputs.python == 'true' | |
| runs-on: ubuntu-26.04 | |
| # The full suite takes about 42 minutes on two-worker runners. Leave | |
| # headroom for setup, scoped coverage gates, uploads, and runner variance. | |
| timeout-minutes: 60 | |
| permissions: | |
| # Declaring any permission drops the defaults, and checkout and `$/` actions | |
| # need read access wherever the repository is not public. | |
| contents: read | |
| id-token: write | |
| strategy: | |
| matrix: | |
| # Just "current" here, on both push and PR — the "next" Python minor is | |
| # exercised separately by the nightly canary (python-nightly-canary.yml) | |
| # so cross-version breaks don't cost a runner on every push/PR. | |
| python-version: ["current"] | |
| env: | |
| PYTHONPATH: ${{ github.workspace }} | |
| steps: | |
| - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| submodules: recursive | |
| - name: Setup Python | |
| uses: $/.github/actions/setup-backend/ | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Verify Teams SDK is available for authentication and delivery tests | |
| run: python -c "import microsoft_teams.apps" | |
| - name: Install HiveServer2 transport test dependencies | |
| run: uv pip install --system -e ".[hive,impala]" | |
| - name: SDK unit tests | |
| env: | |
| PYTEST_DISABLE_PLUGIN_AUTOLOAD: "1" | |
| PYTHONPATH: ${{ github.workspace }}/superset-core/src | |
| run: | | |
| python -m pytest -q -o addopts='' superset-core/tests --junit-xml=test-results/junit-sdk.xml | |
| # The babel_update.sh tests run the script's msgcat step and fail on CI | |
| # when gettext is missing (tests/unit_tests/scripts/translations). | |
| - name: Install gettext tools | |
| uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3 | |
| with: | |
| packages: gettext | |
| version: 1.0 | |
| # Runs in parallel via pytest-xdist: the serial suite had grown to | |
| # ~27-28 min against this job's 30-minute timeout, so the trailing | |
| # coverage/upload steps were being killed on ordinary runner variance | |
| # even though every test passed. `--dist loadfile` keeps all tests from | |
| # one file on one worker, which preserves module-scoped fixture state; | |
| # pytest-cov combines the per-worker coverage data automatically. | |
| # `--durations=0` makes `--durations-min` effective (the min flag only | |
| # filters an enabled report) so the slow-file critical path under | |
| # loadfile stays visible. `--maxfail` is a controller-level stop: tests | |
| # already dispatched to workers finish, so the final failure count can | |
| # slightly exceed it. | |
| - name: Python unit tests | |
| env: | |
| SUPERSET_TESTENV: true | |
| SUPERSET_SECRET_KEY: not-a-secret | |
| run: | | |
| pytest -n auto --dist loadfile --durations=0 --durations-min=0.5 --cov-report= --cov=superset ./tests/common ./tests/unit_tests --cache-clear --maxfail=50 --junit-xml=test-results/junit-unit.xml | |
| # COVERAGE_FILE keeps these scoped gates off the default .coverage that | |
| # the step above wrote. pytest-cov starts a fresh data file per run, so | |
| # without it the last gate replaces the full-suite data and the report | |
| # uploaded below contains only that gate's subtree -- every other file | |
| # then reads as uncovered, and patch coverage on an unrelated PR is 0%. | |
| # Same pytest-xdist settings as the full run above: these two gates | |
| # re-run their subtrees serially otherwise, about 3.5 minutes on a | |
| # runner whose other cores sit idle. pytest-cov combines the | |
| # per-worker data before --cov-fail-under is evaluated. | |
| - name: Python 100% coverage unit tests | |
| env: | |
| SUPERSET_TESTENV: true | |
| SUPERSET_SECRET_KEY: not-a-secret | |
| run: | | |
| COVERAGE_FILE="${RUNNER_TEMP}/.coverage.sql" pytest -n auto --dist loadfile --durations-min=0.5 --cov=superset/sql/ ./tests/unit_tests/sql/ --cache-clear --cov-fail-under=100 --junit-xml=test-results/junit-sql-coverage.xml | |
| COVERAGE_FILE="${RUNNER_TEMP}/.coverage.semantic_layers" pytest -n auto --dist loadfile --durations-min=0.5 --cov=superset/semantic_layers/ ./tests/unit_tests/semantic_layers/ --cache-clear --cov-fail-under=100 --junit-xml=test-results/junit-semantic-layers-coverage.xml | |
| - name: Upload code coverage | |
| uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 | |
| with: | |
| flags: python,unit | |
| verbose: true | |
| use_oidc: true | |
| slug: apache/superset | |
| # Uploaded even when a pytest step above fails, since that is exactly | |
| # when the JUnit results are needed downstream, to annotate the PR with | |
| # the failing tests. Consumed by the "Python Unit Test Results" workflow | |
| # via workflow_run (see that workflow for why it can't just be a step | |
| # here: it needs to run with write permissions, which this PR-triggered | |
| # job can't safely have on a fork PR). | |
| - name: Upload JUnit test results | |
| if: always() | |
| uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | |
| with: | |
| name: junit-results-${{ matrix.python-version }} | |
| path: test-results/ | |
| retention-days: 7 | |
| # Uploads the raw pull_request event payload so the "Python Unit Test | |
| # Results" workflow (running via workflow_run, in base-branch context) can | |
| # look up which PR/commit to annotate without checking out untrusted code. | |
| event-file: | |
| runs-on: ubuntu-26.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Upload event file | |
| uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 | |
| with: | |
| name: Event File | |
| path: ${{ github.event_path }} | |
| retention-days: 7 | |
| # Stable required-status-check anchor. `unit-tests` is a matrix job gated on | |
| # change detection, so on non-Python PRs it is skipped and never produces its | |
| # `unit-tests (current)` context (a job-level skip happens before matrix | |
| # expansion). This always-running job reports a single context that branch | |
| # protection can require: it passes when unit-tests succeeded or was skipped, | |
| # and fails only on a real failure. | |
| unit-tests-required: | |
| needs: [changes, unit-tests] | |
| if: always() | |
| runs-on: ubuntu-slim | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: read | |
| actions: read | |
| steps: | |
| - uses: Kesin11/actions-timeline@460b1f8a750077029ad3589824d371b200e91dcf # v3.2.1 | |
| with: | |
| expand-composite-actions: true | |
| - name: Check unit-tests result | |
| env: | |
| RESULT: ${{ needs.unit-tests.result }} | |
| run: | | |
| if [ "$RESULT" != "success" ] && [ "$RESULT" != "skipped" ]; then | |
| echo "unit-tests did not pass (result: $RESULT)" | |
| exit 1 | |
| fi | |
| echo "unit-tests result: $RESULT" |