Skip to content

open-reading-frame/setup-python-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

setup-python-action

This action is intended to be used by other actions/workflows to setup a given python environment. It will run python setup (default is version 3.10) by wrapping the actions/setup-python action, install python requirements given a requirements.txt file path and/or list of python packages, and cache dependency installation appropriately. Wildcards may be used for the path to the requirements.txt file(s). Note that if a requirements.txt file is not explicitly given, caching will be disabled.

Setup Python 3.10

- name: Install and set up Python 3.10
  uses: open-reading-frame/setup-python-action@main

Setup Python 3.x

- name: Install and set up Python 3.x
  uses: open-reading-frame/setup-python-action@main
  with:
    python-version: 3.x

Install Specific Python Dependencies

- name: Checkout source tree
  uses: actions/checkout@v3
- name: Install and set up Python 3.10 and install dependencies
  uses: open-reading-frame/setup-python-action@main
  with:
    requirements-txt: path/to/requirements.txt
    packages: <package 1> <package 2> ...

Install Wildcard Python Dependencies

- name: Checkout source tree
  uses: actions/checkout@v3
- name: Install and set up Python 3.10 and install dependencies
  uses: open-reading-frame/setup-python-action@main
  with:
    requirements-txt: '**/requirements.txt'

About

Set up python, automatically caching installed dependencies

Resources

License

Stars

Watchers

Forks

Packages

No packages published