File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 9
9
- development
10
10
workflow_dispatch :
11
11
inputs :
12
+ spec_file :
13
+ description : ' Choose a file'
14
+ required : false
15
+ type : ' file'
12
16
sha :
13
17
description : ' Specify commit hash to test. This value is mandatory to ensure the tests run against a specific commit'
14
- required : true
18
+ required : false
15
19
default : ' '
16
20
pull_request_number :
17
21
description : ' Specify pull request number associated with the commit. Optional, but recommended when providing a commit hash (sha)'
40
44
test-linode-cli :
41
45
runs-on : ubuntu-latest
42
46
if : |
43
- github.event_name == 'workflow_dispatch' && inputs.sha != '' ||
47
+ github.event_name == 'workflow_dispatch' ||
44
48
github.event_name == 'push' ||
45
49
(github.event_name == 'pull_request' && inputs.run_on_pr == 'True')
46
50
@@ -68,12 +72,19 @@ jobs:
68
72
- name : Get JSON Spec Path
69
73
run : |
70
74
cd json-spec
75
+ # Set default JSON spec path
71
76
echo "JSON_SPEC_PATH=$(pwd)/openapi.json" >> $GITHUB_ENV
77
+ # If spec_file is provided, use it; otherwise fallback to default
78
+ if [[ -n "${{ inputs.spec_file }}" ]]; then
79
+ echo "SPEC_FILE_PATH=${{ inputs.spec_file }}" >> $GITHUB_ENV
80
+ else
81
+ echo "SPEC_FILE_PATH=$(pwd)/openapi.json" >> $GITHUB_ENV
82
+ fi
72
83
73
84
- name : Install Linode CLI
74
85
run : |
75
86
cd linode-cli
76
- SPEC="${{ env.JSON_SPEC_PATH }}" make install
87
+ SPEC="${{ env.SPEC_FILE_PATH }}" make install
77
88
78
89
- name : Run CLI E2E Tests
79
90
run : |
You can’t perform that action at this time.
0 commit comments