-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
39 lines (33 loc) · 1.05 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
name: "Run pytest with poetry"
description: "Sets up Python, Poetry, and then runs tests via 'poetry run pytest'. Outputs the current project version of the pyproject.toml"
inputs:
run-command:
description: "Command to run via 'poetry run'"
required: true
poetry-version:
description: "Version of poetry to install"
required: false
default: "1.1.14"
python-version:
description: "Version of python to install"
required: false
default: "3.10"
outputs:
project-version:
description: Current project version of pyproject.toml
value: ${{ steps.setup-poetry.outputs.project-version }}
runs:
using: "composite"
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup poetry
id: setup-poetry
uses: henningwoehr/action-poetry-setup@v1
with:
python-version: ${{ inputs.python-version }}
poetry-version: ${{ inputs.poetry-version }}
install-dependencies: true
- name: Run poetry command
run: poetry run ${{ inputs.run-command }}
shell: bash