bump version to v0.0.1rc1 #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Validate | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| workflow_call: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v9.0.0 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: uv sync --locked | |
| - name: Lint code | |
| run: uv run ruff check | |
| - name: Check formatting | |
| run: uv run ruff format --check | |
| - name: Type check | |
| run: uv run mypy src/ | |
| - name: Install the docs group | |
| run: uv sync --locked --group docs | |
| - name: Build the documentation | |
| run: uv run python scripts/build_docs.py --strict | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ['3.10', '3.11', '3.12', '3.13'] | |
| include: | |
| - os: macos-latest | |
| python-version: '3.13' | |
| - os: windows-latest | |
| python-version: '3.13' | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v9.0.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --locked | |
| - name: Run unit tests | |
| run: uv run pytest -q | |
| test-contract: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v9.0.0 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies with the local extra | |
| run: uv sync --locked --extra local | |
| - name: Run the shared contract test | |
| run: uv run pytest tests/test_contract.py -q | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v9.0.0 | |
| with: | |
| python-version: '3.12' | |
| - name: Build the package | |
| run: uv build | |
| - name: Import the built wheel in a clean environment | |
| run: | | |
| uv run --no-project --isolated --with dist/*.whl \ | |
| python -c "import guard_client; print(guard_client.__version__)" | |
| - name: Upload distributions | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: dist-${{ github.sha }} | |
| path: dist/ | |
| retention-days: 7 |