diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..bc1b41b0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v4 + + - name: Set up Python + run: uv python install 3.13 + + - name: Run ruff lint check + run: uv run ruff check . + + typecheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v4 + + - name: Set up Python + run: uv python install 3.13 + + - name: Run pyright + run: uv run pyright diff --git a/pyproject.toml b/pyproject.toml index 74a57220..b298a210 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ dependencies = [ "packaging>=25.0", "pathspec>=0.12.1", "platformdirs>=4.5.0", - "pyright>=1.1.406", + "pyright>=1.1.407", "requests>=2.32.5", "urllib3>=2.5.0", "google-cloud-compute>=1.22.0", @@ -21,6 +21,16 @@ dependencies = [ "google-cloud-resource-manager>=1.12.0", ] +[tool.pyright] +pythonVersion = "3.13" +typeCheckingMode = "basic" + +exclude = [ + "**/__pycache__", + "**/.venv", + ".venv", +] + [tool.ruff] line-length = 88 target-version = "py313" diff --git a/uv.lock b/uv.lock index 74ae8b28..6c764aa6 100644 --- a/uv.lock +++ b/uv.lock @@ -121,7 +121,7 @@ requires-dist = [ { name = "packaging", specifier = ">=25.0" }, { name = "pathspec", specifier = ">=0.12.1" }, { name = "platformdirs", specifier = ">=4.5.0" }, - { name = "pyright", specifier = ">=1.1.406" }, + { name = "pyright", specifier = ">=1.1.407" }, { name = "requests", specifier = ">=2.32.5" }, { name = "ruff", specifier = ">=0.8.0" }, { name = "urllib3", specifier = ">=2.5.0" }, @@ -433,15 +433,15 @@ wheels = [ [[package]] name = "pyright" -version = "1.1.406" +version = "1.1.407" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "nodeenv" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/f7/16/6b4fbdd1fef59a0292cbb99f790b44983e390321eccbc5921b4d161da5d1/pyright-1.1.406.tar.gz", hash = "sha256:c4872bc58c9643dac09e8a2e74d472c62036910b3bd37a32813989ef7576ea2c", size = 4113151, upload-time = "2025-10-02T01:04:45.488Z" } +sdist = { url = "https://files.pythonhosted.org/packages/a6/1b/0aa08ee42948b61745ac5b5b5ccaec4669e8884b53d31c8ec20b2fcd6b6f/pyright-1.1.407.tar.gz", hash = "sha256:099674dba5c10489832d4a4b2d302636152a9a42d317986c38474c76fe562262", size = 4122872, upload-time = "2025-10-24T23:17:15.145Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f6/a2/e309afbb459f50507103793aaef85ca4348b66814c86bc73908bdeb66d12/pyright-1.1.406-py3-none-any.whl", hash = "sha256:1d81fb43c2407bf566e97e57abb01c811973fdb21b2df8df59f870f688bdca71", size = 5980982, upload-time = "2025-10-02T01:04:43.137Z" }, + { url = "https://files.pythonhosted.org/packages/dc/93/b69052907d032b00c40cb656d21438ec00b3a471733de137a3f65a49a0a0/pyright-1.1.407-py3-none-any.whl", hash = "sha256:6dd419f54fcc13f03b52285796d65e639786373f433e243f8b94cf93a7444d21", size = 5997008, upload-time = "2025-10-24T23:17:13.159Z" }, ] [[package]]