name: Check python dependencies 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: check-python-deps: runs-on: ubuntu-22.04 steps: - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" uses: actions/checkout@v5 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/ - 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