-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
44 lines (43 loc) · 1.22 KB
/
action.yml
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
name: "davidkhala/poetry-buildpack"
description: A typical poetry build steps. Assume you have checkout source already
branding:
icon: 'package'
color: 'purple'
inputs:
tests:
description: 'Test Sources Root: working-directory of your tests'
required: false
default: tests
test-entry-point:
description: 'script of test command'
required: false
version:
description: 'python version'
required: false
working-directory:
description: 'poetry home path'
required: false
default: .
extras:
description: 'extras to be installed'
required: false
runs:
using: "composite"
steps:
- if: ${{ inputs.version != '' }}
uses: actions/setup-python@main
with:
python-version: ${{ inputs.version }}
- uses: snok/install-poetry@main
- if: ${{ inputs.extras != '' }}
run: poetry install --extras "${{inputs.extras}}"
working-directory: ${{inputs.working-directory}}
shell: bash
- if: ${{ inputs.extras == '' }}
run: poetry install --all-extras
working-directory: ${{inputs.working-directory}}
shell: bash
- if: ${{ inputs.test-entry-point != '' }}
run: poetry run ${{ inputs.test-entry-point }}
working-directory: ${{ inputs.tests }}
shell: bash