1010 module :
1111 description : " The module from 'test/integration' to the target to be tested, e.g. 'cli, domains, events, etc'"
1212 required : false
13+ run_long_tests :
14+ description : " Select True to run long tests, e.g. database, rebuild, etc"
15+ required : false
16+ type : choice
17+ options :
18+ - " True"
19+ - " False"
20+ default : " False"
1321 sha :
1422 description : ' The hash value of the commit.'
1523 required : true
1624 default : ' '
1725 pull_request_number :
1826 description : ' The number of the PR. Ensure sha value is provided'
1927 required : false
28+ openapi_spec_url :
29+ description : ' URL of the OpenAPI spec to use for the tests'
30+ required : false
31+ default : ' '
32+ python-version :
33+ description : ' Specify Python version to use'
34+ required : false
35+ run-eol-python-version :
36+ description : ' Run EOL python version?'
37+ required : false
38+ default : ' false'
39+ type : choice
40+ options :
41+ - ' true'
42+ - ' false'
43+
2044 push :
2145 branches :
2246 - main
2347 - dev
2448
49+ env :
50+ DEFAULT_PYTHON_VERSION : " 3.10"
51+ EOL_PYTHON_VERSION : " 3.8"
52+ EXIT_STATUS : 0
53+
2554jobs :
2655 integration_tests :
2756 name : Run integration tests on Ubuntu
74103 - name : Setup Python
75104 uses : actions/setup-python@v4
76105 with :
77- python-version : ' 3.x '
106+ python-version : ${{ inputs.run-eol-python-version == 'true' && env.EOL_PYTHON_VERSION || inputs.python-version || env.DEFAULT_PYTHON_VERSION }}
78107
79108 - name : Install Python dependencies and update cert
80109 run : |
83112 pip install .[obj,dev]
84113
85114 - name : Install Package
86- run : make install
115+ run : make install SPEC="${{ inputs.OPENAPI_SPEC_URL }}"
87116 env :
88117 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
89118
95124 run : |
96125 timestamp=$(date +'%Y%m%d%H%M')
97126 report_filename="${timestamp}_cli_test_report.xml"
98- make testint TEST_ARGS="--junitxml=${report_filename}" MODULE="${{ inputs.module }}"
127+ make testint TEST_ARGS="--junitxml=${report_filename}" MODULE="${{ inputs.module }}" RUN_LONG_TESTS="${{ inputs.run_long_tests }}"
99128 env :
100129 LINODE_CLI_TOKEN : ${{ env.LINODE_CLI_TOKEN }}
101130
@@ -272,4 +301,4 @@ jobs:
272301 ]
273302 }
274303 env :
275- SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
304+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
0 commit comments