|
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 | 10 | sha: |
11 | | - description: 'The hash value of the commit' |
12 | | - required: false |
| 11 | + description: 'Specify commit hash to test. This value is mandatory to ensure the tests run against a specific commit' |
| 12 | + required: true |
13 | 13 | default: '' |
14 | 14 | python-version: |
15 | | - description: 'Specify Python version to use' |
| 15 | + description: 'Specify the Python version to use for running tests. Leave empty to use the default Python version configured in the environment' |
16 | 16 | required: false |
17 | 17 | run-eol-python-version: |
18 | | - description: 'Run EOL python version?' |
| 18 | + 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' |
19 | 19 | required: false |
20 | 20 | default: 'false' |
21 | 21 | type: choice |
|
28 | 28 | - dev |
29 | 29 |
|
30 | 30 | env: |
31 | | - DEFAULT_PYTHON_VERSION: "3.9" |
32 | | - EOL_PYTHON_VERSION: "3.8" |
| 31 | + DEFAULT_PYTHON_VERSION: "3.10" |
| 32 | + EOL_PYTHON_VERSION: "3.9" |
33 | 33 | EXIT_STATUS: 0 |
34 | 34 |
|
35 | 35 | jobs: |
@@ -72,24 +72,18 @@ jobs: |
72 | 72 | run: | |
73 | 73 | timestamp=$(date +'%Y%m%d%H%M') |
74 | 74 | report_filename="${timestamp}_sdk_test_report.xml" |
75 | | - make testint TEST_ARGS="--junitxml=${report_filename}" |
| 75 | + make test-int TEST_ARGS="--junitxml=${report_filename}" |
76 | 76 | env: |
77 | 77 | LINODE_TOKEN: ${{ env.LINODE_TOKEN }} |
78 | 78 |
|
79 | | - - name: Upload test results |
| 79 | + - name: Upload Test Report as Artifact |
80 | 80 | if: always() |
81 | | - run: | |
82 | | - filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$') |
83 | | - python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/add_gha_info_to_xml.py \ |
84 | | - --branch_name "${GITHUB_REF#refs/*/}" \ |
85 | | - --gha_run_id "$GITHUB_RUN_ID" \ |
86 | | - --gha_run_number "$GITHUB_RUN_NUMBER" \ |
87 | | - --xmlfile "${filename}" |
88 | | - sync |
89 | | - python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/xml_to_obj.py "${filename}" |
90 | | - env: |
91 | | - LINODE_CLI_OBJ_ACCESS_KEY: ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }} |
92 | | - LINODE_CLI_OBJ_SECRET_KEY: ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }} |
| 81 | + uses: actions/upload-artifact@v4 |
| 82 | + with: |
| 83 | + name: test-report-file |
| 84 | + if-no-files-found: ignore |
| 85 | + path: '*.xml' |
| 86 | + retention-days: 1 |
93 | 87 |
|
94 | 88 | apply-calico-rules: |
95 | 89 | runs-on: ubuntu-latest |
@@ -156,10 +150,54 @@ jobs: |
156 | 150 | env: |
157 | 151 | LINODE_CLI_TOKEN: ${{ env.LINODE_TOKEN }} |
158 | 152 |
|
| 153 | + process-upload-report: |
| 154 | + runs-on: ubuntu-latest |
| 155 | + needs: [integration-tests] |
| 156 | + if: always() && github.repository == 'linode/linode_api4-python' # Run even if integration tests fail and only on main repository |
| 157 | + |
| 158 | + steps: |
| 159 | + - name: Checkout code |
| 160 | + uses: actions/checkout@v4 |
| 161 | + with: |
| 162 | + fetch-depth: 0 |
| 163 | + submodules: 'recursive' |
| 164 | + |
| 165 | + - name: Download test report |
| 166 | + uses: actions/download-artifact@v4 |
| 167 | + with: |
| 168 | + name: test-report-file |
| 169 | + |
| 170 | + - name: Set up Python |
| 171 | + uses: actions/setup-python@v5 |
| 172 | + with: |
| 173 | + python-version: '3.x' |
| 174 | + |
| 175 | + - name: Install Python dependencies |
| 176 | + run: pip3 install requests wheel boto3==1.35.99 |
| 177 | + |
| 178 | + - name: Set release version env |
| 179 | + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV |
| 180 | + |
| 181 | + |
| 182 | + - name: Add variables and upload test results |
| 183 | + if: always() |
| 184 | + run: | |
| 185 | + filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$') |
| 186 | + python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/add_gha_info_to_xml.py \ |
| 187 | + --branch_name "${GITHUB_REF#refs/*/}" \ |
| 188 | + --gha_run_id "$GITHUB_RUN_ID" \ |
| 189 | + --gha_run_number "$GITHUB_RUN_NUMBER" \ |
| 190 | + --xmlfile "${filename}" |
| 191 | + sync |
| 192 | + python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/xml_to_obj.py "${filename}" |
| 193 | + env: |
| 194 | + LINODE_CLI_OBJ_ACCESS_KEY: ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }} |
| 195 | + LINODE_CLI_OBJ_SECRET_KEY: ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }} |
| 196 | + |
159 | 197 | notify-slack: |
160 | 198 | runs-on: ubuntu-latest |
161 | 199 | needs: [integration-tests] |
162 | | - if: ${{ (success() || failure()) && github.repository == 'linode/linode_api4-python' }} # Run even if integration tests fail and only on main repository |
| 200 | + if: ${{ (success() || failure()) }} # Run even if integration tests fail and only on main repository |
163 | 201 | steps: |
164 | 202 | - name: Notify Slack |
165 | 203 | uses: slackapi/slack-github-action@v2.0.0 |
|
0 commit comments