From 68c807518e406652c7ea9a0cff814c512c45fc79 Mon Sep 17 00:00:00 2001 From: Patrick Arminio Date: Fri, 9 Jan 2026 16:23:28 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Add=20GitHub=20Actions=20workflo?= =?UTF-8?q?w=20for=20linting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/lint.yml | 38 ++++++++++++++++++++++++ src/fastapi_cloud_cli/commands/deploy.py | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..fb6ca08 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,38 @@ +name: Lint + +on: + push: + branches: + - main + pull_request: + types: + - opened + - synchronize + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version-file: "pyproject.toml" + - name: Install uv + uses: astral-sh/setup-uv@v7 + - name: Install Dependencies + run: uv sync --locked --all-extras --dev + - name: Lint + run: uv run --no-sync scripts/lint.sh + + # https://github.com/marketplace/actions/alls-green#why + lint-alls-green: # This job does nothing and is only used for the branch protection + if: always() + needs: + - lint + runs-on: ubuntu-latest + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }} diff --git a/src/fastapi_cloud_cli/commands/deploy.py b/src/fastapi_cloud_cli/commands/deploy.py index e833f71..89347e2 100644 --- a/src/fastapi_cloud_cli/commands/deploy.py +++ b/src/fastapi_cloud_cli/commands/deploy.py @@ -295,7 +295,7 @@ def _configure_app(toolkit: RichToolkit, path_to_deploy: Path) -> AppConfig: toolkit.print_line() - selected_app: AppResponse | None = None + selected_app: Optional[AppResponse] = None if not create_new_app: with toolkit.progress("Fetching apps...") as progress: