From 7f9f42c8121c7875b334234aa20f987633f3e0f9 Mon Sep 17 00:00:00 2001 From: Joydip Roy Date: Sat, 19 Apr 2025 21:22:37 +0530 Subject: [PATCH 1/6] fix: action checkout --- .github/actions/setup/action.yml | 3 --- .github/workflows/ci.yml | 10 +++++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index a23a0ee..c987c3f 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -4,9 +4,6 @@ description: Action Setup runs: using: composite steps: - - name: Check out code - uses: actions/checkout@v4 - - name: "Install UV" uses: astral-sh/setup-uv@v5 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0fb0805..4f79d57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,6 @@ on: push: branches: ["main"] pull_request: - branches: ["main"] permissions: contents: read @@ -13,6 +12,9 @@ jobs: lint: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: ./.github/actions/setup - run: uv lock --locked @@ -25,6 +27,9 @@ jobs: build: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: ./.github/actions/setup - run: uv lock --locked @@ -37,6 +42,9 @@ jobs: test: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: ./.github/actions/setup - run: uv lock --locked From e52c1f97028e19164589876560e50491f0ca139e Mon Sep 17 00:00:00 2001 From: Joydip Roy Date: Sat, 19 Apr 2025 21:24:38 +0530 Subject: [PATCH 2/6] fix: all groups cmd --- .github/actions/setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index c987c3f..2c8ca7f 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -11,4 +11,4 @@ runs: - name: Install dependencies shell: bash - run: uv sync --all-extras --all-packages --group + run: uv sync --all-extras --all-packages --all-groups From 4811bad869c5f47f0c47146a2671fea0d43e775f Mon Sep 17 00:00:00 2001 From: Joydip Roy Date: Sat, 19 Apr 2025 21:29:30 +0530 Subject: [PATCH 3/6] fix: uv lock issue --- .github/actions/setup/action.yml | 4 +++- .github/workflows/ci.yml | 9 +++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 2c8ca7f..8779a70 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -11,4 +11,6 @@ runs: - name: Install dependencies shell: bash - run: uv sync --all-extras --all-packages --all-groups + run: | + uv sync --all-extras --all-packages --all-groups + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f79d57..cba20eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,9 @@ jobs: uses: actions/checkout@v4 - uses: ./.github/actions/setup - - run: uv lock --locked + + - name: Deps check + run: uv lock --locked - name: Lint run: uv run ruff check --fix @@ -31,14 +33,10 @@ jobs: uses: actions/checkout@v4 - uses: ./.github/actions/setup - - run: uv lock --locked - name: Build run: uv build --all-packages - - name: List Dist - run: ls -lh dist/ - test: runs-on: ubuntu-latest steps: @@ -46,7 +44,6 @@ jobs: uses: actions/checkout@v4 - uses: ./.github/actions/setup - - run: uv lock --locked - name: Test run: uv run pytest tests \ No newline at end of file From bad7be6de32e6c7a13dd5124679fda86225b8731 Mon Sep 17 00:00:00 2001 From: Joydip Roy Date: Sat, 19 Apr 2025 21:32:49 +0530 Subject: [PATCH 4/6] fix: uv lock issue - 2 --- .github/workflows/ci.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cba20eb..8b85e22 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - uses: ./.github/actions/setup - name: Deps check - run: uv lock --locked + run: uv lock --check - name: Lint run: uv run ruff check --fix diff --git a/pyproject.toml b/pyproject.toml index 2761516..4eda7bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,7 +67,7 @@ propagate = false # UV [tool.uv] -upgrade = true +upgrade = false default-groups = "all" # Pyright From ebf3e7ed5518a85e9895e7db5413d9fcfe0542a8 Mon Sep 17 00:00:00 2001 From: Joydip Roy Date: Sat, 19 Apr 2025 21:36:03 +0530 Subject: [PATCH 5/6] fix: type check uv cmd --- .github/actions/setup/action.yml | 4 ++-- .github/workflows/ci.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 8779a70..890c3da 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -9,8 +9,8 @@ runs: with: enable-cache: true - - name: Install dependencies + - name: Install deps shell: bash run: | - uv sync --all-extras --all-packages --all-groups + uv sync --locked --all-extras --all-packages --all-groups diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b85e22..c8ce194 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: run: uv run ruff check --fix - name: Typecheck - run: uv name pyright + run: uv run pyright build: runs-on: ubuntu-latest From 6eccc5733821089712167924eb7f924ff717fd44 Mon Sep 17 00:00:00 2001 From: Joydip Roy Date: Sat, 19 Apr 2025 21:40:05 +0530 Subject: [PATCH 6/6] chore: updated readme with CI badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 49c314a..cc9dd4b 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv) [![image](https://img.shields.io/pypi/v/uv.svg)](https://pypi.python.org/pypi/uv) [![Checked with pyright](https://microsoft.github.io/pyright/img/pyright_badge.svg)](https://microsoft.github.io/pyright/) +[![CI](https://github.com/rjoydip/python-starter/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/rjoydip/python-starter/actions/workflows/ci.yml) A project template with UV package manager and CI integration.