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.
- name: Install and set up Python 3.10
uses: open-reading-frame/setup-python-action@main
- name: Install and set up Python 3.x
uses: open-reading-frame/setup-python-action@main
with:
python-version: 3.x
- 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> ...
- 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'