Skip to content

Commit 705ba0c

Browse files
committed
♻️ Extract the values of Python versions and OS as parameters for common usage.
1 parent 55fb1e4 commit 705ba0c

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/workflows/rw_uv_run_test_with_multi_py_versions.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
# * test_type: The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'.
99
# * all_test_items_paths: The target paths of test items under test.
1010
# * install_dependency_with_group: Install the dependency by UV configuration with dependency group setting. This parameter receive the dependency group naming.
11+
# * python-versions: JSON array of Python versions to test against. Default: '["3.13"]'
12+
# * operating-systems: JSON array of operating systems to test on. Default: '["ubuntu-latest", "ubuntu-22.04", "macos-latest", "macos-14"]'
1113
#
1214
# Workflow running output:
1315
# No, but it would save the testing coverage reports to provide after-process to organize and record.
@@ -57,6 +59,16 @@ on:
5759
type: number
5860
required: false
5961
default: 0
62+
python-versions:
63+
description: "JSON array of Python versions to test against."
64+
type: string
65+
required: false
66+
default: '["3.13"]'
67+
operating-systems:
68+
description: "JSON array of operating systems to test on."
69+
type: string
70+
required: false
71+
default: '["ubuntu-latest", "ubuntu-22.04", "macos-latest", "macos-14"]'
6072
secrets:
6173
e2e_test_api_token:
6274
description: "Set the API token for end-to-end test if it needs."
@@ -67,8 +79,8 @@ jobs:
6779
strategy:
6880
max-parallel: ${{ inputs.max-parallel }}
6981
matrix:
70-
python-version: ['3.13']
71-
os: [ubuntu-latest,ubuntu-22.04,macos-latest,macos-14]
82+
python-version: ${{fromJson(inputs.python-versions)}}
83+
os: ${{fromJson(inputs.operating-systems)}}
7284
test-path: ${{fromJson(inputs.all_test_items_paths)}}
7385
fail-fast: false # Fix issue in GitHub Action: FailFast: cancelling since parallel instance has failed
7486

@@ -96,9 +108,9 @@ jobs:
96108
run: |
97109
uv pip install --group=${{ inputs.install_dependency_with_group }}
98110
99-
- name: Verify the ClickUp API token
111+
- name: Verify the Slack bot token
100112
run: |
101-
curl -s https://api.clickup.com/api/v2/team -H "Authorization: ${{ secrets.e2e_test_api_token }}"
113+
curl -s https://slack.com/api/auth.test -H "Authorization: Bearer $SLACK_BOT_TOKEN"
102114
103115
- name: Run the specific tests with pytest
104116
if: ${{ inputs.test_type == '' }}

0 commit comments

Comments
 (0)