chore(deps): update uvicorn requirement from ^0.35.0 to >=0.35,<0.38 #602
Workflow file for this run
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
| name: pre-commit | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| with: | |
| fetch-depth: 0 # Full history for diffing | |
| - name: Set up Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 | |
| with: | |
| python-version: '3.x' | |
| - name: Install Pre-Commit | |
| run: pip install pre-commit | |
| - name: Determine Changed Files or Full Scan | |
| id: changed-files | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "Running from workflow_dispatch. Scanning entire repo." | |
| git ls-files > files.txt | |
| else | |
| echo "Running from pull_request. Checking changed files only." | |
| BASE_BRANCH=${{ github.base_ref }} | |
| git fetch origin $BASE_BRANCH --depth=1 | |
| git diff --name-only origin/$BASE_BRANCH HEAD > files.txt | |
| fi | |
| if [ -s files.txt ]; then | |
| { | |
| echo "CHANGED_FILES<<EOF" | |
| cat files.txt | |
| echo "EOF" | |
| } >> $GITHUB_ENV | |
| else | |
| echo "No changed files." | |
| echo "CHANGED_FILES=" >> $GITHUB_ENV | |
| fi | |
| - name: Run Pre-Commit Hooks | |
| run: | | |
| if [ -n "${{ env.CHANGED_FILES }}" ]; then | |
| echo "Running pre-commit on:" | |
| echo "${{ env.CHANGED_FILES }}" | |
| echo "${{ env.CHANGED_FILES }}" | tr '\n' '\0' | xargs -0 pre-commit run --files | |
| else | |
| echo "No changed files to check." | |
| fi |