Merge pull request #8 from pcm-primerose/structural-mapping-mvp #20
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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| quality: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| run: | | |
| if ! command -v uv >/dev/null; then | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| fi | |
| echo "$HOME/.local/bin" >> "$GITHUB_PATH" | |
| - name: Cache uv | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/uv | |
| ~/.cache/pre-commit | |
| key: uv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}-${{ hashFiles('.pre-commit-config.yaml') }}-${{ hashFiles('pyproject.toml') }} | |
| restore-keys: | | |
| uv-${{ runner.os }}-${{ matrix.python-version }}- | |
| - name: Sync dependencies with dev | |
| env: | |
| UV_PROJECT_ENVIRONMENT: .venv | |
| UV_LINK_MODE: copy | |
| run: uv sync --frozen --dev | |
| - name: Lint & format | |
| run: uv run pre-commit run --all-files --show-diff-on-failure | |
| - name: Tests | |
| run: uv run pytest | |
| - name: Build package | |
| run: uv build | |
| - name: Upload artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ci-artifacts-${{ matrix.python-version }} | |
| path: | | |
| dist/* | |
| if-no-files-found: ignore |