From 6cea83594fd4b7a5b26e4aba5f48cf600c92aaa0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:47:32 +0000 Subject: [PATCH 1/2] chore(deps): bump astral-sh/setup-uv in the github-actions group (#1938) Bumps the github-actions group with 1 update: [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv). Updates `astral-sh/setup-uv` from 3 to 4 - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/v3...v4) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docs_deploy.yaml | 2 +- .github/workflows/docs_update-references.yaml | 2 +- .../workflows/docs_update-release-notes.yaml | 2 +- .github/workflows/pr_tests.yaml | 28 +++++++++---------- .github/workflows/publish_coverage.yaml | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/docs_deploy.yaml b/.github/workflows/docs_deploy.yaml index 6f7046a6c6..0e48307427 100644 --- a/.github/workflows/docs_deploy.yaml +++ b/.github/workflows/docs_deploy.yaml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" - uses: actions/setup-python@v5 diff --git a/.github/workflows/docs_update-references.yaml b/.github/workflows/docs_update-references.yaml index 2b2bc2732d..8776fb6507 100644 --- a/.github/workflows/docs_update-references.yaml +++ b/.github/workflows/docs_update-references.yaml @@ -25,7 +25,7 @@ jobs: with: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.head_ref }} - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" - name: Set up Python diff --git a/.github/workflows/docs_update-release-notes.yaml b/.github/workflows/docs_update-release-notes.yaml index 9192d23e98..70513977e2 100644 --- a/.github/workflows/docs_update-release-notes.yaml +++ b/.github/workflows/docs_update-release-notes.yaml @@ -20,7 +20,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" - name: Configure Git user diff --git a/.github/workflows/pr_tests.yaml b/.github/workflows/pr_tests.yaml index 4f7048a8c1..a8be0eff57 100644 --- a/.github/workflows/pr_tests.yaml +++ b/.github/workflows/pr_tests.yaml @@ -58,7 +58,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" - name: Set up Python @@ -101,7 +101,7 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" - name: Set up Python @@ -122,7 +122,7 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" - name: Set up Python @@ -143,7 +143,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" - name: Set up Python @@ -184,7 +184,7 @@ jobs: ALLOW_PLAINTEXT_LISTENER: "true" steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" - name: Set up Python @@ -216,7 +216,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" - name: Set up Python @@ -257,7 +257,7 @@ jobs: ALLOW_PLAINTEXT_LISTENER: "true" steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" - name: Set up Python @@ -289,7 +289,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" - name: Set up Python @@ -319,7 +319,7 @@ jobs: - 5672:5672 steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" - name: Set up Python @@ -351,7 +351,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" - name: Set up Python @@ -381,7 +381,7 @@ jobs: - 4222:4222 steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" - name: Set up Python @@ -413,7 +413,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" - name: Set up Python @@ -443,7 +443,7 @@ jobs: - 6379:6379 steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" - name: Set up Python @@ -483,7 +483,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" - uses: actions/setup-python@v5 diff --git a/.github/workflows/publish_coverage.yaml b/.github/workflows/publish_coverage.yaml index 755b0cf9ce..dea0b8d7ba 100644 --- a/.github/workflows/publish_coverage.yaml +++ b/.github/workflows/publish_coverage.yaml @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.9" - - uses: astral-sh/setup-uv@v3 + - uses: astral-sh/setup-uv@v4 with: version: "latest" From c75f00147174ece984e7fe6b2b9303f3946302a8 Mon Sep 17 00:00:00 2001 From: Kumaran Rajendhiran Date: Tue, 26 Nov 2024 22:20:42 +0530 Subject: [PATCH 2/2] Run PR altering automated check in same CI job (#1942) * Run PR altering automated checks in same job * Add detect-secrets to manual stage --- .github/workflows/pr_tests.yaml | 8 -------- ... => pr_update-linting-and-api-references.yaml} | 15 +++++++++++---- .pre-commit-config.yaml | 1 + 3 files changed, 12 insertions(+), 12 deletions(-) rename .github/workflows/{docs_update-references.yaml => pr_update-linting-and-api-references.yaml} (76%) diff --git a/.github/workflows/pr_tests.yaml b/.github/workflows/pr_tests.yaml index a8be0eff57..b75380074e 100644 --- a/.github/workflows/pr_tests.yaml +++ b/.github/workflows/pr_tests.yaml @@ -38,14 +38,6 @@ jobs: path: ~/.cache/pre-commit key: pre-commit|${{ hashFiles('.pre-commit-config.yaml') }} - uses: pre-commit/action@v3.0.1 - continue-on-error: true - with: - extra_args: --hook-stage manual --all-files - - name: Commit - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: "fix: add missing pre-commit changes" - - uses: pre-commit/action@v3.0.1 test-basic: if: github.event.pull_request.draft == false diff --git a/.github/workflows/docs_update-references.yaml b/.github/workflows/pr_update-linting-and-api-references.yaml similarity index 76% rename from .github/workflows/docs_update-references.yaml rename to .github/workflows/pr_update-linting-and-api-references.yaml index 8776fb6507..e666f40db9 100644 --- a/.github/workflows/docs_update-references.yaml +++ b/.github/workflows/pr_update-linting-and-api-references.yaml @@ -1,4 +1,4 @@ -name: Generate API References documentation +name: Run linting, update API References and commit changes on: pull_request_target: @@ -6,8 +6,6 @@ on: - opened - synchronize - ready_for_review - paths: - - faststream/** concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -17,7 +15,7 @@ permissions: contents: write jobs: - check-docs-changes: + check-linting-and-docs-changes: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: @@ -32,6 +30,8 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.12" + - name: Set $PY environment variable + run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' shell: bash @@ -39,8 +39,15 @@ jobs: run: | set -ux uv pip install --system -e .[dev] + + - uses: pre-commit/action@v3.0.1 + continue-on-error: true + with: + extra_args: --hook-stage manual --all-files + - name: Run build docs run: bash scripts/build-docs.sh + - name: Commit uses: stefanzweifel/git-auto-commit-action@v5 with: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e4cde3a9c5..306f7c8001 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -68,3 +68,4 @@ repos: - id: detect-secrets args: ['--baseline', '.secrets.baseline'] exclude: package.lock.json + stages: [pre-commit, pre-merge-commit, manual]