Clean up should_use_uv #1610
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: Source package | |
| on: [push, pull_request] | |
| permissions: read-all | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -qq swig libpcsclite-dev libudev-dev libdbus-1-dev | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install the project | |
| run: uv sync --locked | |
| - name: Run pre-commit hooks | |
| run: | | |
| uv tool install pre-commit | |
| pre-commit run --all-files --verbose | |
| - name: Run unit tests | |
| run: uv run pytest | |
| - name: Create source packages | |
| run: | | |
| export SOURCE_DATE_EPOCH=$(git show --no-patch --format=%ct) | |
| uv build --package yubikit --sdist | |
| uv build --package yubikey-manager --sdist | |
| mkdir artifacts | |
| mv dist/yubikit-*.tar.gz artifacts/ | |
| mv dist/yubikey_manager-*.tar.gz artifacts/ | |
| - name: Upload source packages | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: yubikey-manager-source-package | |
| path: artifacts | |
| - name: Build sphinx documentation | |
| run: uv run make -C docs/ html | |
| - name: Upload documentation | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: yubikey-manager-docs | |
| path: docs/_build/html |