-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
52 lines (44 loc) · 1.29 KB
/
action.yaml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: setup-python
description: Installs Python and project dependencies
inputs:
python_version:
description: Python version
runs:
using: composite
steps:
- name: Setup Python
id: install-python
uses: actions/setup-python@v4
with:
python-version: '${{ inputs.python_version }}'
cache: pipenv
- name: Install pipenv
id: install-pipenv
shell: bash
run: pip install --user --upgrade pipenv
# FIXME: We're not checking this value anywhere and should be
# This is to ensure that all jobs in a workflow will resolve the same dependencies
- name: Check Pipfile.lock
id: check-pipfile-lock
shell: bash
run: |
if [ -f Pipfile.lock ]; \
then \
echo "has-lock=true" >> $GITHUB_OUTPUT; \
else \
echo "has-lock=false" >> $GITHUB_OUTPUT; \
fi
- name: Install dependencies
id: install-python-deps
shell: bash
run: pipenv install --dev
outputs:
python-version:
description: Python version
value: ${{ steps.install-python.outputs.python-version }}
python-path:
description: Python path
value: ${{ steps.install-python.outputs.python-path }}
cache-hit:
description: Cache hit
value: ${{ steps.install-python.outputs.cache-hit }}