-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaction.yaml
More file actions
31 lines (27 loc) · 1.11 KB
/
action.yaml
File metadata and controls
31 lines (27 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Setup/Cache Env
description: 'Sets up and caches a python env. Will only install dependencies if no cache was hit.'
inputs:
pyproject-file-path:
required: False
description: "Path to the pyproject.toml including filename"
default: "./pyproject.toml"
runs:
using: composite
steps:
- name: Setup Python from pyproject.toml
uses: ./.github/actions/python_from_pyproject
with:
pyproject-file-path: ${{ inputs.pyproject-file-path }}
- name: Cache Env
uses: actions/cache@v4.2.3
id: env-cache
with:
path: ${{ env.pythonLocation }}
key: ${{ hashFiles('./requirements/requirements.txt') }}-${{ hashFiles('./requirements/requirements_test.txt') }}
- name: Install Dependencies
if: ${{ steps.env-cache.outputs.cache-hit != 'true' }}
run: |
python -m pip install --upgrade pip
pip install -r requirements/requirements.txt
pip install -r requirements/requirements_test.txt
shell: bash