forked from csernazs/pytest-httpserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
58 lines (51 loc) · 1.75 KB
/
action.yml
File metadata and controls
58 lines (51 loc) · 1.75 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: "setup poetry and python"
description: "Setup python, poetry, and development environment"
inputs:
type:
description: "Type of the venv to create"
required: true
python-version:
description: "Python version to use"
required: true
poetry-version:
description: "Poetry version to use"
required: true
runs:
using: "composite"
steps:
- name: Setup python
id: setup_python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Cache venv
id: cache-venv
uses: actions/cache@v4
with:
path: .venv
key: venv-v4-${{ inputs.type }}-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Cache pre-commit
id: cache-pre-commit
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-v4-${{ inputs.type }}-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Cache setup-poetry
id: cache-setup-poetry
uses: actions/cache@v4
with:
path: |
~/.local/share/pypoetry
~/.local/share/virtualenv
~/.local/bin/poetry
key: setup-poetry-v4-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ inputs.poetry-version }}
- name: Setup poetry
uses: Gr1N/setup-poetry@v8
id: setup_poetry
if: steps.cache-setup-poetry.outputs.cache-hit != 'true'
with:
poetry-version: ${{ inputs.poetry-version }}
- name: Bootstrap environment
shell: bash
run: |
make dev EXTRAS=${{ inputs.type }}