Skip to content

Commit

Permalink
Run PR altering automated check in same CI job (#1942)
Browse files Browse the repository at this point in the history
* Run PR altering automated checks in same job

* Add detect-secrets to manual stage
  • Loading branch information
kumaranvpl authored Nov 26, 2024
1 parent 6cea835 commit c75f001
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/pr_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
name: Generate API References documentation
name: Run linting, update API References and commit changes

on:
pull_request_target:
types:
- opened
- synchronize
- ready_for_review
paths:
- faststream/**

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -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:
Expand All @@ -32,15 +30,24 @@ 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
# should install with `-e`
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:
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@ repos:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
exclude: package.lock.json
stages: [pre-commit, pre-merge-commit, manual]

0 comments on commit c75f001

Please sign in to comment.