https://github.com/py-actions/py-dependency-install
A GitHub Action that installs Python package dependencies from a user-defined requirements.txt file path with optional pip, setuptools, and wheel installs/updates
https://github.com/py-actions/py-dependency-install
ci continuous-integration dependency dependency-manager github-actions pypi python python3 requirements
Last synced: 6 months ago
JSON representation
A GitHub Action that installs Python package dependencies from a user-defined requirements.txt file path with optional pip, setuptools, and wheel installs/updates
- Host: GitHub
- URL: https://github.com/py-actions/py-dependency-install
- Owner: py-actions
- License: apache-2.0
- Created: 2020-05-07T03:41:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-28T18:38:42.000Z (over 1 year ago)
- Last Synced: 2025-06-03T23:15:21.949Z (7 months ago)
- Topics: ci, continuous-integration, dependency, dependency-manager, github-actions, pypi, python, python3, requirements
- Language: JavaScript
- Homepage:
- Size: 1.67 MB
- Stars: 27
- Watchers: 2
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# py-actions/py-dependency-install GitHub Action

[](https://github.com/py-actions/py-dependency-install/actions?query=workflow%3A%22Linux+CI%22)
[](https://github.com/py-actions/py-dependency-install/actions?query=workflow%3A%22macOS+CI%22)
[](https://github.com/py-actions/py-dependency-install/actions?query=workflow%3A%22Windows+CI%22)
[](https://github.com/py-actions/py-dependency-install/actions?query=workflow%3ALint)
[](https://github.com/py-actions/py-dependency-install/actions/workflows/codeql.yml)
This GitHub Action installs Python package dependencies from a user-defined `requirements.txt` file path with `pip`, `setuptools`, and `wheel` installs/updates during execution. A Python package environment report is displayed at the end of Action execution.
This Action is tested nightly with cPython v3.9.x - v3.12.x in the latest Linux, macOS, and Windows GitHub Actions runner environments.
## Quick Start
Insert a dependency installation step under the `steps:` field in a GitHub workflow job with a configuration like this:
### Default
Uses path `requirements.txt` and updates `pip`, `setuptools`, and `wheel` before the install.
```yaml
steps:
# this Action should follow steps to set up Python build environment
- name: Install Python dependencies
uses: py-actions/py-dependency-install@v4
```
### Define the `requirements.txt` path
Define a requirements.txt file on a path relative to the root of your repository.
```yaml
steps:
# this Action should follow steps to set up Python build environment
- name: Install Python dependencies
uses: py-actions/py-dependency-install@v4
with:
path: "path/to/requirements.txt"
```
### Toggle `pip`, `setuptools`, and `wheel` installs/updates off
The `pip`, `setuptools`, and `wheel` install/updates can be toggled off in your configuration. Use one or more of the `update-pip`, `update-setuptools`, and `update-wheel` settings with a boolean string to customize the default behavior:
```yaml
steps:
# this Action should follow steps to set up Python build environment
- name: Install Python dependencies
uses: py-actions/py-dependency-install@v4
with:
update-pip: "false"
update-setuptools: "false"
update-wheel: "false"
```
## Inputs
### `path`
**Optional** The `requirements.txt` file path relative to the root of your source repository. Default = `"requirements.txt"`.
### `update-pip`
**Optional** A boolean string indicating that a `pip` package update should occur before the dependency installation. Options: [`"true"`, `"false"`]. Default=`"true"`
### `update-setuptools`
**Optional** A boolean string indicating that a `setuptools` package update should occur before the dependency installation. Options: [`"true"`, `"false"`]. Default=`"true"`
### `update-wheel`
**Optional** A boolean string indicating that a `wheel` package update should occur before the dependency installation. Options: [`"true"`, `"false"`]. Default=`"true"`
## Outputs
None
## License
[Apache License, v2.0](LICENSE)