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: