Skip to content

Commit

Permalink
docs: improve docs description on install, setup, config
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-zuev committed Feb 23, 2025
1 parent d7c38be commit 6593c1c
Show file tree
Hide file tree
Showing 5 changed files with 261 additions and 324 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [ main ]


env:
UV_VERSION: "0.6.1" # Pin uv version to avoid breaking changes

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -21,26 +25,27 @@ jobs:
python-version: "3.12"

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}

- name: Create venv and install dependencies
run: |
# Create venv and install dependencies
uv venv
source .venv/bin/activate
uv pip install -e .
uv add --dev pytest pytest-asyncio pytest-mock
uv sync --group dev --frozen
# uv pip install -e .
# uv add --dev pytest pytest-asyncio pytest-mock
- name: Run tests
run: |
source .venv/bin/activate
pytest
- name: Test build
- name: Build distribution packages
run: |
uv build
uv build --no-sources
# Verify dist contains both wheel and tar.gz
test -f dist/*.whl
test -f dist/*.tar.gz
21 changes: 14 additions & 7 deletions .github/workflows/docs/release-checklist.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Release Checklist

Pre-release
1. Tests pass
2. CI passes
3. Build succeeds
Expand All @@ -9,13 +10,19 @@
7. Tag and release on GitHub
8. Release is published to PyPI

## v0.2.3 - 2025-02-22
Post-release
- Clean install from PyPi works



## v0.3.0 - 2025-02-22

1. Tests pass - [X]
2. CI passes
2. CI passes - [X]
3. Build succeeds - [X]
4. Clean install succeeds
5. Documentation is up to date
6. Changelog is up to date
7. Tag and release on GitHub
8. Release is published to PyPI
4. Clean install succeeds - [X]
5. Documentation is up to date - [X]
6. Changelog is up to date - [X]
7. Tag and release on GitHub - [X]
8. Release is published to PyPI - [X]
9. Clean install from PyPI works - [X]
81 changes: 64 additions & 17 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,84 @@ name: Publish to PyPI

on:
release:
types: [created]
types: [published]

env:
UV_VERSION: "0.6.0" # Pin uv version to avoid breaking changes

jobs:
publish:
build-and-publish:
runs-on: ubuntu-latest
environment: release
environment:
name: pypi
url: https://test.pypi.org/project/supabase-mcp-server/ # TODO: Change to pypi.org after testing
permissions:
id-token: write # mandatory for trusted publishing
id-token: write # Required for trusted publishing
contents: read

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for proper version detection

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}

- name: Set up Python 3.12
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install uv
- name: Build package
run: uv build --no-sources

- name: Verify version matches tag
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
PKG_VERSION=$(hatch version)
TAG_VERSION=${GITHUB_REF#refs/tags/v}
if [ "$PKG_VERSION" != "$TAG_VERSION" ]; then
echo "Package version ($PKG_VERSION) does not match tag version ($TAG_VERSION)"
exit 1
fi
- name: Build package
- name: Verify package installation and entry points
env:
SUPABASE_PROJECT_REF: ${{ secrets.SUPABASE_PROJECT_REF }}
SUPABASE_DB_PASSWORD: ${{ secrets.SUPABASE_DB_PASSWORD }}
run: |
uv venv
source .venv/bin/activate
uv pip install -e .
uv build
# Create a new venv for testing
uv venv --name test-venv
source test-venv/bin/activate
# Install the built wheel
uv pip install dist/*.whl
echo "Testing supabase-mcp-server entry point..."
# Run with --help to test basic functionality without needing actual connection
if ! uv run supabase-mcp-server --help; then
echo "❌ supabase-mcp-server --help failed"
exit 1
fi
echo "✅ supabase-mcp-server --help succeeded"
echo "Testing supabase-mcp-inspector entry point..."
if ! uv run supabase-mcp-inspector --help; then
echo "❌ supabase-mcp-inspector --help failed"
exit 1
fi
echo "✅ supabase-mcp-inspector --help succeeded"
# Test actual connection if credentials are available
echo "Testing actual connection with supabase-mcp-inspector..."
if ! timeout 30s uv run supabase-mcp-inspector; then
echo "❌ supabase-mcp-inspector connection test failed"
exit 1
fi
echo "✅ supabase-mcp-inspector connection test succeeded"
- name: Publish to PyPI
run: |
source .venv/bin/activate
uv pip install --upgrade build twine
uv publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/ # TODO: Change to pypi.org after testing
Loading

0 comments on commit 6593c1c

Please sign in to comment.