Merge pull request #7 from pko89403/docs/confidence-aware-reranking-refs #72
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: | |
| push: | |
| branches: [main, master] | |
| tags: ["v*"] | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: astral-sh/setup-uv@v8.1.0 | |
| with: | |
| cache-suffix: py-${{ matrix.python-version }} | |
| - name: Set up Python | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Run tests | |
| run: uv run --python ${{ matrix.python-version }} pytest | |
| - name: Run ruff | |
| run: uv run --python ${{ matrix.python-version }} ruff check . | |
| - name: Check formatting | |
| run: uv run --python ${{ matrix.python-version }} ruff format --check . | |
| - name: Run mypy | |
| run: uv run --python ${{ matrix.python-version }} mypy src | |
| - name: Build package | |
| run: uv build | |
| publish-testpypi: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| if: >- | |
| startsWith(github.ref, 'refs/tags/v') && | |
| ( | |
| contains(github.ref_name, 'a') || | |
| contains(github.ref_name, 'b') || | |
| contains(github.ref_name, 'rc') || | |
| contains(github.ref_name, 'dev') | |
| ) | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: astral-sh/setup-uv@v8.1.0 | |
| - name: Build package | |
| run: uv build | |
| - name: Check package metadata | |
| run: uv tool run twine check dist/* | |
| - name: Publish to TestPyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| publish-pypi: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| if: >- | |
| startsWith(github.ref, 'refs/tags/v') && | |
| !contains(github.ref_name, 'a') && | |
| !contains(github.ref_name, 'b') && | |
| !contains(github.ref_name, 'rc') && | |
| !contains(github.ref_name, 'dev') | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: astral-sh/setup-uv@v8.1.0 | |
| - name: Build package | |
| run: uv build | |
| - name: Check package metadata | |
| run: uv tool run twine check dist/* | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |