Securely install the latest pytest release from PyPI.
This action installs a pinned version of pytest and all its dependencies, making sure that file hashes match. Pinning your dependencies:
- Stops software supply chain attacks.
- Makes sure your CI does not break unexpectedly.
In your GitHub Actions workflow, use this action like so:
- name: Install pytest from PyPI
uses: install-pinned/pytest@66bff5b921093c38d055ec180765227216faeafc # 9.2.0You can set up Dependabot so that your pins are updated regularly.
This action is a relatively simple wrapper around uv and is most useful if there is no existing requirements.txt/uv.lock/... infrastructure in place. If you already pin all your dependencies in a single place, you don't need it!
See the @install-pinned README for details.