docs(readme): make sure version is replaced #18
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: test | |
| on: push | |
| permissions: | |
| contents: read | |
| jobs: | |
| unit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install dependencies | |
| run: uv sync --extra test | |
| - name: Run tests with coverage | |
| run: | | |
| uv run coverage run -m pytest | |
| uv run coverage report | |
| uv run coverage xml | |
| package: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Create project | |
| run: uv init | |
| - name: Install package | |
| run: uv add $(gh release view --repo ${{ github.repository }} --json assets -q '.assets[] | select(.name | endswith(".whl")) | .url') | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| - name: Update script | |
| run: | | |
| cat <<EOF > main.py | |
| from python_package import hello | |
| print(hello()) | |
| EOF | |
| - name: Run script | |
| run: uv run main.py |