Skip to content

A GitHub Action that installs Python package dependencies from a user-defined requirements.txt file path with optional pip, setuptools, and wheel installs/updates

License

py-actions/py-dependency-install

Use this GitHub Action with your project

Add this Action to an existing workflow or create a new one.

View on Marketplace
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

py-actions/py-dependency-install GitHub Action

Version Linux CI macOS CI Windows CI Lint

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.7.x - v3.10.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.

steps:
  # this Action should follow steps to set up Python build environment
  - name: Install Python dependencies
    uses: py-actions/py-dependency-install@v3

Define the requirements.txt path

Define a requirements.txt file on a path relative to the root of your repository.

steps:
  # this Action should follow steps to set up Python build environment
  - name: Install Python dependencies
    uses: py-actions/py-dependency-install@v3
    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:

steps:
  # this Action should follow steps to set up Python build environment
  - name: Install Python dependencies
    uses: py-actions/py-dependency-install@v3
    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

About

A GitHub Action that installs Python package dependencies from a user-defined requirements.txt file path with optional pip, setuptools, and wheel installs/updates

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published