|
6 | 6 | omicron-sha: |
7 | 7 | type: "string" |
8 | 8 | required: true |
| 9 | + testrail-upload: |
| 10 | + type: "boolean" |
| 11 | + required: false |
| 12 | + default: false |
9 | 13 | secrets: |
10 | 14 | testrail-host: |
11 | 15 | required: false |
@@ -129,24 +133,24 @@ jobs: |
129 | 133 | if [ -f ./acc-test-rerun.txt ]; then |
130 | 134 | echo "::warning title=${{ github.job }} (${{ matrix.tf-binary }}) - test rerun::$(cat ./acc-test-rerun.txt)" |
131 | 135 | fi |
132 | | - #- name: upload test results to TestRail |
133 | | - # if: always() |
134 | | - # continue-on-error: true |
135 | | - # env: |
136 | | - # TR_CLI_HOST: ${{ secrets.testrail-host }} |
137 | | - # TR_CLI_USERNAME: ${{ secrets.testrail-username }} |
138 | | - # TR_CLI_KEY: ${{ secrets.testrail-api-key }} |
139 | | - # TR_CLI_PROJECT: ${{ secrets.testrail-project }} |
140 | | - # run: | |
141 | | - # uvx trcli \ |
142 | | - # --yes `# Auto-create new test cases.` \ |
143 | | - # parse_junit \ |
144 | | - # --file './acctest/acc-tests.xml' \ |
145 | | - # --title 'Acceptance Tests (${{ matrix.tf-binary }}) - ${{ github.run_id }} - ${{ job.check_run_id }}' \ |
146 | | - # --run-description 'GitHub workflow: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ job.check_run_id }}' \ |
147 | | - # --update-existing-cases 'yes' \ |
148 | | - # --case-matcher 'auto' \ |
149 | | - # --close-run |
| 136 | + - name: upload test results to TestRail |
| 137 | + if: ${{ always() && inputs.testrail-upload }} |
| 138 | + continue-on-error: true |
| 139 | + env: |
| 140 | + TR_CLI_HOST: ${{ secrets.testrail-host }} |
| 141 | + TR_CLI_USERNAME: ${{ secrets.testrail-username }} |
| 142 | + TR_CLI_KEY: ${{ secrets.testrail-api-key }} |
| 143 | + TR_CLI_PROJECT: ${{ secrets.testrail-project }} |
| 144 | + run: | |
| 145 | + uvx trcli \ |
| 146 | + --yes `# Auto-create new test cases.` \ |
| 147 | + parse_junit \ |
| 148 | + --file './acctest/acc-tests.xml' \ |
| 149 | + --title 'Acceptance Tests (${{ matrix.tf-binary }}) - ${{ github.run_id }} - ${{ job.check_run_id }}' \ |
| 150 | + --run-description 'GitHub workflow: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ job.check_run_id }}' \ |
| 151 | + --update-existing-cases 'yes' \ |
| 152 | + --case-matcher 'auto' \ |
| 153 | + --close-run |
150 | 154 | - name: upload logs |
151 | 155 | if: always() |
152 | 156 | continue-on-error: true |
|
0 commit comments