File tree Expand file tree Collapse file tree 2 files changed +34
-3
lines changed
actions/install_requirements Expand file tree Collapse file tree 2 files changed +34
-3
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 2424 run : |
2525 python -m pip install --upgrade pip
2626 pip install .[dev]
27- - name : Linting
28- run : |
29- tox -e pre-commit
3027 - name : Test with pytest
3128 env :
3229 CONFIG_PATH : /home/runner/work/pato-backend/pato-backend/config.json
You can’t perform that action at this time.
0 commit comments