chore: bump pytest-cov from 6.3.0 to 7.1.0 #263
Workflow file for this run
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
| # This workflow builds the package, installs it, and tests basic functionality | |
| name: Build and Test Python Package | |
| on: | |
| pull_request: | |
| branches: ["main"] | |
| workflow_call: | |
| env: | |
| PYTHON_VERSION: "3.10" | |
| jobs: | |
| build-package: | |
| name: Build Package | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Build package | |
| uses: ./.github/actions/python-package-build | |
| id: build | |
| with: | |
| uv-version: "0.8.22" | |
| python-version: "${{ env.PYTHON_VERSION }}" | |
| - name: Upload package artifact | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: python-package-${{ github.sha }} | |
| path: dist/ | |
| retention-days: 1 | |
| test-build-package-extras: | |
| name: Test package build ${{ matrix.name}} | |
| runs-on: ubuntu-latest | |
| needs: build-package | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| include: | |
| - name: cli | |
| test-args: "twyn --version" | |
| - name: mcp | |
| test-args: | | |
| cat <<EOF > init_msg.json | |
| {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}} | |
| EOF | |
| cat init_msg.json | uv run python src/twyn/mcp/main.py | grep -q "capabilities" | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Download package artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: python-package-${{ github.sha }} | |
| path: dist/ | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 | |
| with: | |
| version: "0.8.22" | |
| - name: Test package | |
| run: | | |
| uv venv --python $PYTHON_VERSION | |
| WHEEL_FILE=$(ls dist/*.whl) | |
| uv pip install "$WHEEL_FILE[${{ matrix.name }}]" | |
| uv run ${{ matrix.test-args }} | |
| test-build-package-no-extras: | |
| name: Test package build no extras | |
| runs-on: ubuntu-latest | |
| needs: build-package | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Download package artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: python-package-${{ github.sha }} | |
| path: dist/ | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 | |
| with: | |
| version: "0.8.22" | |
| - name: Test package | |
| run: | | |
| uv venv --python $PYTHON_VERSION | |
| WHEEL_FILE=$(ls dist/*.whl) | |
| uv pip install "$WHEEL_FILE" | |
| uv run python -c 'import twyn; twyn.check_dependencies()' |