File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
actions/install_requirements Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Install requirements
2+ description : Install a version of python then call pip install and report what was installed
3+ inputs :
4+ python-version :
5+ description : Python version to install, default is from Dockerfile
6+ default : " dev"
7+ pip-install :
8+ description : Parameters to pass to pip install
9+ default : " $([ -f dev-requirements.txt ] && echo '-c dev-requirements.txt') -e .[dev]"
10+
11+ runs :
12+ using : composite
13+ steps :
14+ - name : Get version of python
15+ run : |
16+ PYTHON_VERSION="${{ inputs.python-version }}"
17+ if [ $PYTHON_VERSION == "dev" ]; then
18+ PYTHON_VERSION=$(sed -n "s/ARG PYTHON_VERSION=//p" Dockerfile)
19+ fi
20+ echo "PYTHON_VERSION=$PYTHON_VERSION" >> "$GITHUB_ENV"
21+ shell : bash
22+
23+ - name : Setup python
24+ uses : actions/setup-python@v5
25+ with :
26+ python-version : ${{ env.PYTHON_VERSION }}
27+
28+ - name : Install packages
29+ run : pip install ${{ inputs.pip-install }}
30+ shell : bash
31+
32+ - name : Report what was installed
33+ run : pip freeze
34+ shell : bash
Original file line number Diff line number Diff line change 1212 upload :
1313 runs-on : ubuntu-latest
1414 environment : release
15+ strategy :
16+ matrix :
17+ python-version : ["3.12"]
1518
1619 steps :
1720
You can’t perform that action at this time.
0 commit comments