Skip to content

Commit e6d39f7

Browse files
authored
Merge pull request #83 from Chisanan232/develop
[CU-86et1f25t] Improve the reusable workflow about running test with option about installing dependency without different group
2 parents 299b972 + 5911357 commit e6d39f7

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/rw_poetry_run_test.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ on:
5252
type: string
5353
required: false
5454
default: ''
55+
install_dependency_without_group:
56+
description: "Install the dependency by Poetry configuration without dependency group setting. This parameter receive the dependency group naming."
57+
type: string
58+
required: false
59+
default: ''
5560
all_test_items_paths:
5661
description: "The target paths of test items under test."
5762
required: true
@@ -115,17 +120,23 @@ jobs:
115120
pip install -U flask
116121
pip install -U gunicorn
117122
pip install -U poetry
123+
poetry --version
118124
119125
- name: Build Python runtime environment by Poetry
126+
if: ${{ inputs.install_dependency_with_group != '' || inputs.install_dependency_without_group != '' }}
120127
run: |
121-
poetry --version
122128
poetry install
123129
124130
- name: Build Python runtime environment by Poetry with dependency group *${{ inputs.install_dependency_with_group }}*
125131
if: ${{ inputs.install_dependency_with_group != '' }}
126132
run: |
127133
poetry install --with=${{ inputs.install_dependency_with_group }}
128134
135+
- name: Build Python runtime environment by Poetry without dependency group *${{ inputs.install_dependency_without_group }}*
136+
if: ${{ inputs.install_dependency_without_group != '' }}
137+
run: |
138+
poetry install --without=${{ inputs.install_dependency_without_group }}
139+
129140
- name: Setup and run HTTP server for testing
130141
if: ${{ inputs.setup_http_server == true }}
131142
run: gunicorn --bind ${{ inputs.http_server_host }}:${{ inputs.http_server_port }} '${{ inputs.http_server_app_module }}:${{ inputs.http_server_enter_point }}' --daemon

0 commit comments

Comments
 (0)