Spaces:
Paused
Paused
Download .github/workflows/check-python-deps.yml from Leon4gr45/powerbi: direct link, hf CLI and curl.
- Browser
- Download file 2.75 kB
-
https://huggingface.co/spaces/Leon4gr45/powerbi/resolve/main/.github/workflows/check-python-deps.yml
- Command line
-
hf download hf://spaces/Leon4gr45/powerbi/.github/workflows/check-python-deps.yml
-
curl -L -o check-python-deps.yml https://huggingface.co/spaces/Leon4gr45/powerbi/resolve/main/.github/workflows/check-python-deps.yml
2.75 kB
| name: Check python dependencies | |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| - "[0-9].[0-9]*" | |
| pull_request: | |
| types: [synchronize, opened, reopened, ready_for_review] | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| actions: read | |
| # cancel previous workflow jobs for PRs | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| check-python-deps: | |
| runs-on: ubuntu-26.04 | |
| steps: | |
| - uses: Kesin11/actions-timeline@57fc93f20c6da7fbc14063c6d24a2a5627c799ad # v3.2.0 | |
| with: | |
| expand-composite-actions: true | |
| - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| submodules: recursive | |
| fetch-depth: 1 | |
| - name: Check for file changes | |
| id: check | |
| uses: ./.github/actions/change-detector/ | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Python | |
| if: steps.check.outputs.python | |
| uses: ./.github/actions/setup-backend/ | |
| # Authenticate the Docker daemon so the python:slim pull in | |
| # uv-pip-compile.sh uses our (much higher) authenticated rate limit | |
| # instead of the shared-runner anonymous one. Best-effort: on fork PRs the | |
| # secrets are unavailable, so this no-ops and the pull falls back to | |
| # anonymous (covered by the retry loop in the script). | |
| - name: Login to Docker Hub | |
| if: steps.check.outputs.python | |
| continue-on-error: true | |
| uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USER }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Run uv | |
| if: steps.check.outputs.python | |
| run: ./scripts/uv-pip-compile.sh | |
| - name: Check for uncommitted changes | |
| if: steps.check.outputs.python | |
| run: | | |
| echo "Full diff (for logging/debugging):" | |
| git diff | |
| echo "Filtered diff (excluding comments and whitespace):" | |
| filtered_diff=$(git diff -U0 | grep '^[-+]' | grep -vE '^[-+]{3}' | grep -vE '^[-+][[:space:]]*#' | grep -vE '^[-+][[:space:]]*$' || true) | |
| echo "$filtered_diff" | |
| if [[ -n "$filtered_diff" ]]; then | |
| echo | |
| echo "ERROR: The pinned dependencies are not up-to-date." | |
| echo "Please run './scripts/uv-pip-compile.sh' and commit the changes." | |
| echo "More info: https://github.com/apache/superset/tree/master/requirements" | |
| exit 1 | |
| else | |
| echo "Pinned dependencies are up-to-date." | |
| fi | |