diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index a23a0ee..890c3da 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -4,14 +4,13 @@ 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: enable-cache: true - - name: Install dependencies + - name: Install deps shell: bash - run: uv sync --all-extras --all-packages --group + run: | + uv sync --locked --all-extras --all-packages --all-groups + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0fb0805..c8ce194 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,32 +12,38 @@ jobs: lint: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: ./.github/actions/setup - - run: uv lock --locked + + - name: Deps check + run: uv lock --check - name: Lint run: uv run ruff check --fix - name: Typecheck - run: uv name pyright + run: uv run pyright build: runs-on: ubuntu-latest steps: + - name: Checkout + 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: + - name: Checkout + 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 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. 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