diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 963ec73..d2f74fe 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,18 +37,13 @@ jobs: uses: ./.github/actions/setup-nix - name: Install dependencies - run: nix develop --command uv sync ${{ matrix.sync-extras }} + run: nix develop --command just install ${{ matrix.sync-extras }} - name: Run Lint - run: nix develop --command uv run ruff check . + run: nix develop --command just lint - name: Run Mypy - run: | - if [[ "${{ matrix.python-version }}" == "3.9" ]]; then - nix develop --command uv run mypy stackone_ai --exclude stackone_ai/server.py - else - nix develop --command uv run mypy stackone_ai - fi + run: nix develop --command just mypy - name: Run Tests - run: nix develop --command uv run pytest + run: nix develop --command just test diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 03c5fc1..05425b9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -30,12 +30,12 @@ jobs: - name: Update version in __init__.py if: ${{ steps.release.outputs.release_created }} - run: nix develop --command uv run scripts/update_version.py + run: nix develop --command just update-version - name: Build and publish package if: ${{ steps.release.outputs.release_created }} env: UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }} run: | - nix develop --command uv build - nix develop --command uv publish + nix develop --command just build + nix develop --command just publish diff --git a/justfile b/justfile index 02ec5dd..1a9d7e7 100644 --- a/justfile +++ b/justfile @@ -1,6 +1,6 @@ # Install dependencies and pre-commit hooks -install: - uv sync --all-extras +install *extras: + uv sync {{ extras }} # Run ruff linting lint: @@ -25,3 +25,15 @@ test-examples: # Run type checking mypy: uv run mypy stackone_ai + +# Update version in __init__.py +update-version: + uv run scripts/update_version.py + +# Build package +build: + uv build + +# Publish package to PyPI +publish: + uv publish