Skip to content

Commit 38a9dd6

Browse files
authored
fix(ci): use just commands in CI and release workflows (#57)
* chore(ci): use just commands instead of direct uv/mypy calls Refactor CI workflow to use just commands for consistency with local development workflow. This removes the obsolete server.py exclusion from mypy (file was removed in bcb12b4) and makes justfile's install command accept optional extras arguments. Changes: - CI now uses `just install`, `just lint`, `just mypy`, `just test` - justfile install command accepts variable extras arguments - Removes Python 3.9 special case for server.py exclusion * chore(ci): use just commands in release workflow Add update-version, build, and publish commands to justfile and update release.yml to use them instead of direct uv calls.
1 parent 225c852 commit 38a9dd6

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,13 @@ jobs:
3737
uses: ./.github/actions/setup-nix
3838

3939
- name: Install dependencies
40-
run: nix develop --command uv sync ${{ matrix.sync-extras }}
40+
run: nix develop --command just install ${{ matrix.sync-extras }}
4141

4242
- name: Run Lint
43-
run: nix develop --command uv run ruff check .
43+
run: nix develop --command just lint
4444

4545
- name: Run Mypy
46-
run: |
47-
if [[ "${{ matrix.python-version }}" == "3.9" ]]; then
48-
nix develop --command uv run mypy stackone_ai --exclude stackone_ai/server.py
49-
else
50-
nix develop --command uv run mypy stackone_ai
51-
fi
46+
run: nix develop --command just mypy
5247

5348
- name: Run Tests
54-
run: nix develop --command uv run pytest
49+
run: nix develop --command just test

.github/workflows/release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ jobs:
3030

3131
- name: Update version in __init__.py
3232
if: ${{ steps.release.outputs.release_created }}
33-
run: nix develop --command uv run scripts/update_version.py
33+
run: nix develop --command just update-version
3434

3535
- name: Build and publish package
3636
if: ${{ steps.release.outputs.release_created }}
3737
env:
3838
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
3939
run: |
40-
nix develop --command uv build
41-
nix develop --command uv publish
40+
nix develop --command just build
41+
nix develop --command just publish

justfile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Install dependencies and pre-commit hooks
2-
install:
3-
uv sync --all-extras
2+
install *extras:
3+
uv sync {{ extras }}
44

55
# Run ruff linting
66
lint:
@@ -25,3 +25,15 @@ test-examples:
2525
# Run type checking
2626
mypy:
2727
uv run mypy stackone_ai
28+
29+
# Update version in __init__.py
30+
update-version:
31+
uv run scripts/update_version.py
32+
33+
# Build package
34+
build:
35+
uv build
36+
37+
# Publish package to PyPI
38+
publish:
39+
uv publish

0 commit comments

Comments
 (0)