|
4 | 4 | workflow_dispatch:
|
5 | 5 | inputs:
|
6 | 6 | use_minimal_test_account:
|
7 |
| - description: 'Use minimal test account' |
| 7 | + description: 'Indicate whether to use a minimal test account with limited resources for testing. Defaults to "false"' |
8 | 8 | required: false
|
9 | 9 | default: 'false'
|
10 |
| - module: |
11 |
| - description: "The module from 'test/integration' to the target to be tested, e.g. 'cli, domains, events, etc'" |
| 10 | + test_suite: |
| 11 | + description: "Specify test suite to run from the 'tests/integration' directory. Examples: 'cli', 'domains', 'events', etc. If not provided, all suites are executed" |
12 | 12 | required: false
|
13 | 13 | run_long_tests:
|
14 |
| - description: "Select True to run long tests, e.g. database, rebuild, etc" |
| 14 | + description: "Select 'True' to include long-running tests (e.g., database provisioning, server rebuilds). Defaults to 'False'" |
15 | 15 | required: false
|
16 | 16 | type: choice
|
17 | 17 | options:
|
18 | 18 | - "True"
|
19 | 19 | - "False"
|
20 | 20 | default: "False"
|
21 | 21 | sha:
|
22 |
| - description: 'The hash value of the commit.' |
| 22 | + description: 'Specify commit hash to test. This value is mandatory to ensure the tests run against a specific commit' |
23 | 23 | required: true
|
24 | 24 | default: ''
|
25 | 25 | pull_request_number:
|
26 |
| - description: 'The number of the PR. Ensure sha value is provided' |
| 26 | + description: 'Specify pull request number associated with the commit. Optional, but recommended when providing a commit hash (sha)' |
27 | 27 | required: false
|
28 | 28 | openapi_spec_url:
|
29 |
| - description: 'URL of the OpenAPI spec to use for the tests' |
| 29 | + description: 'Specify URL of the OpenAPI specification file to use for testing. Useful for validating tests against a specific API version or custom specification' |
30 | 30 | required: false
|
31 | 31 | default: ''
|
32 | 32 | python-version:
|
33 |
| - description: 'Specify Python version to use' |
| 33 | + description: 'Specify the Python version to use for running tests. Leave empty to use the default Python version configured in the environment' |
34 | 34 | required: false
|
35 | 35 | run-eol-python-version:
|
36 |
| - description: 'Run EOL python version?' |
| 36 | + description: 'Indicates whether to run tests using an End-of-Life (EOL) Python version. Defaults to "false". Choose "true" to include tests for deprecated Python versions' |
37 | 37 | required: false
|
38 | 38 | default: 'false'
|
39 | 39 | type: choice
|
@@ -124,24 +124,18 @@ jobs:
|
124 | 124 | run: |
|
125 | 125 | timestamp=$(date +'%Y%m%d%H%M')
|
126 | 126 | report_filename="${timestamp}_cli_test_report.xml"
|
127 |
| - make testint TEST_ARGS="--junitxml=${report_filename}" MODULE="${{ inputs.module }}" RUN_LONG_TESTS="${{ inputs.run_long_tests }}" |
| 127 | + make test-int TEST_ARGS="--junitxml=${report_filename}" TEST_SUITE="${{ inputs.test_suite }}" RUN_LONG_TESTS="${{ inputs.run_long_tests }}" |
128 | 128 | env:
|
129 | 129 | LINODE_CLI_TOKEN: ${{ env.LINODE_CLI_TOKEN }}
|
130 | 130 |
|
131 |
| - - name: Upload test results |
| 131 | + - name: Upload Test Report as Artifact |
132 | 132 | if: always()
|
133 |
| - run: | |
134 |
| - filename=$(ls | grep -E '^[0-9]{12}_cli_test_report\.xml$') |
135 |
| - python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/add_gha_info_to_xml.py \ |
136 |
| - --branch_name "${GITHUB_REF#refs/*/}" \ |
137 |
| - --gha_run_id "$GITHUB_RUN_ID" \ |
138 |
| - --gha_run_number "$GITHUB_RUN_NUMBER" \ |
139 |
| - --xmlfile "${filename}" |
140 |
| - sync |
141 |
| - python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/xml_to_obj.py "${filename}" |
142 |
| - env: |
143 |
| - LINODE_CLI_OBJ_ACCESS_KEY: ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }} |
144 |
| - LINODE_CLI_OBJ_SECRET_KEY: ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }} |
| 133 | + uses: actions/upload-artifact@v4 |
| 134 | + with: |
| 135 | + name: test-report-file |
| 136 | + if-no-files-found: ignore |
| 137 | + path: '*.xml' |
| 138 | + retention-days: 1 |
145 | 139 |
|
146 | 140 | - name: Update PR Check Run
|
147 | 141 | uses: actions/github-script@v7
|
@@ -237,6 +231,51 @@ jobs:
|
237 | 231 | env:
|
238 | 232 | LINODE_CLI_TOKEN: ${{ env.LINODE_CLI_TOKEN }}
|
239 | 233 |
|
| 234 | + process-upload-report: |
| 235 | + runs-on: ubuntu-latest |
| 236 | + needs: [integration_tests] |
| 237 | + if: always() && github.repository == 'linode/linode-cli' # Run even if integration tests fail and only on main repository |
| 238 | + |
| 239 | + steps: |
| 240 | + - name: Checkout code |
| 241 | + uses: actions/checkout@v4 |
| 242 | + with: |
| 243 | + fetch-depth: 0 |
| 244 | + submodules: 'recursive' |
| 245 | + |
| 246 | + - name: Download test report |
| 247 | + uses: actions/download-artifact@v4 |
| 248 | + with: |
| 249 | + name: test-report-file |
| 250 | + |
| 251 | + - name: Set up Python |
| 252 | + uses: actions/setup-python@v5 |
| 253 | + with: |
| 254 | + python-version: '3.x' |
| 255 | + |
| 256 | + - name: Install Python dependencies |
| 257 | + run: pip3 install requests wheel boto3==1.35.99 |
| 258 | + |
| 259 | + - name: Set release version env |
| 260 | + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV |
| 261 | + |
| 262 | + |
| 263 | + - name: Add variables and upload test results |
| 264 | + if: always() |
| 265 | + run: | |
| 266 | + filename=$(ls | grep -E '^[0-9]{12}_cli_test_report\.xml$') |
| 267 | + python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/add_gha_info_to_xml.py \ |
| 268 | + --branch_name "${GITHUB_REF#refs/*/}" \ |
| 269 | + --gha_run_id "$GITHUB_RUN_ID" \ |
| 270 | + --gha_run_number "$GITHUB_RUN_NUMBER" \ |
| 271 | + --xmlfile "${filename}" |
| 272 | + sync |
| 273 | + python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/xml_to_obj.py "${filename}" |
| 274 | + env: |
| 275 | + LINODE_CLI_OBJ_ACCESS_KEY: ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }} |
| 276 | + LINODE_CLI_OBJ_SECRET_KEY: ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }} |
| 277 | + |
| 278 | + |
240 | 279 | notify-slack:
|
241 | 280 | runs-on: ubuntu-latest
|
242 | 281 | needs: [integration_tests]
|
|
0 commit comments