Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dont-sleep
Browse files Browse the repository at this point in the history
# Conflicts:
#	faststream/app.py
  • Loading branch information
Olegt0rr committed Sep 10, 2024
2 parents ce26afc + 27125d8 commit 2286bc2
Show file tree
Hide file tree
Showing 433 changed files with 7,960 additions and 2,510 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ services:

networks:
faststream-network:
name: "${USER}-faststream-network"
name: "${USER}-faststream-network"
2 changes: 1 addition & 1 deletion .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ uv venv .venv

uv pip install -e ".[dev]"

source .venv/bin/activate
source .venv/bin/activate
31 changes: 23 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: github-actions
directory: /
schedule:
interval: "weekly"
- package-ecosystem: "pip"
directory: "/"
interval: weekly
# https://til.simonwillison.net/github/dependabot-python-setup
groups:
github-actions:
patterns:
- "*"

- package-ecosystem: pip
directory: /
schedule:
interval: "weekly"
- package-ecosystem: "devcontainers"
directory: "/"
interval: weekly
groups:
pip:
patterns:
- "*"

- package-ecosystem: devcontainers
directory: /
schedule:
interval: weekly
groups:
devcontainers:
patterns:
- "*"
27 changes: 27 additions & 0 deletions .github/workflows/dependabot_automerge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Dependabot automerge

on:
pull_request_target:

jobs:
automerge:
name: Enable pull request automerge
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]'

steps:
- uses: alexwilson/[email protected]
with:
github-token: ${{ secrets.AUTOMERGE_TOKEN }}
merge-method: REBASE

autoapprove:
name: Automatically approve pull request
needs: [automerge]
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]'

steps:
- uses: hmarr/auto-approve-action@v4
with:
github-token: ${{ secrets.AUTOMERGE_TOKEN }}
5 changes: 2 additions & 3 deletions .github/workflows/docs_check-broken-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ on:
workflow_run:
types:
- completed
workflows:
- Deploy Docs to GitHub Pages
workflows: ["pages-build-deployment"]

jobs:
check-broken-link:
Expand All @@ -17,5 +16,5 @@ jobs:
uses: ruzickap/action-my-broken-link-checker@v2
with:
url: https://faststream.airt.ai
cmd_params: '--buffer-size=8192 --max-connections=1 --color=always --header="User-Agent:Mozilla/5.0(Firefox/97.0)" --exclude="(localhost:8000|linkedin.com|fonts.gstatic.com|reddit.com)" --max-connections-per-host=1 --rate-limit=1'
cmd_params: '--buffer-size=8192 --max-connections=1 --color=always --header="User-Agent:Mozilla/5.0(Firefox/97.0)" --exclude="(localhost:8000|linkedin.com|fonts.gstatic.com|reddit.com)" --max-connections-per-host=1 --rate-limit=1 --max-response-body-size=20000000'
debug: true
8 changes: 6 additions & 2 deletions .github/workflows/docs_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
paths:
- docs/**
- .github/workflows/deploy-docs.yaml
- .github/workflows/docs_deploy.yaml
- faststream/__about__.py

permissions:
Expand All @@ -26,7 +26,11 @@ jobs:
with:
key: ${{ github.ref }}
path: .cache
- run: pip install -e ".[dev]"
- run: |
set -ux
python -m pip install uv
uv pip install --system -e .[dev]
uv pip uninstall --system email-validator # This is to fix broken link in docs
- run: ./scripts/build-docs.sh
- run: echo "VERSION=$(python3 -c 'from importlib.metadata import version; print(".".join(version("faststream").split(".")[:2]))')" >> $GITHUB_ENV
- run: echo "IS_RC=$(python3 -c 'from importlib.metadata import version; print("rc" in version("faststream"))')" >> $GITHUB_ENV
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/docs_update-references.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Generate API References documentation

on:
pull_request:
pull_request_target:
types:
- opened
- synchronize
Expand All @@ -22,20 +22,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
shell: bash
# should install with `-e`
run: |
set -ux
python -m pip install uv
uv pip install --system -e ".[dev]"
uv pip install --system -e .[dev]
- name: Run build docs
run: bash scripts/build-docs.sh
- name: Commit
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs_update-release-notes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
python -m pip install uv
uv pip install --system requests
- name: Run update_releases.py script
run: python ./docs/update_releases.py
Expand All @@ -55,7 +55,7 @@ jobs:

- name: Create Pull Request
if: steps.git-check.outputs.changes_detected
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.generate-token.outputs.token }}
branch: ${{ env.BRANCH_NAME }}
Expand Down
Loading

0 comments on commit 2286bc2

Please sign in to comment.