Skip to content

Commit 1671f20

Browse files
committed
tmp
1 parent e11529f commit 1671f20

2 files changed

Lines changed: 28 additions & 23 deletions

File tree

.github/workflows/acceptance-sim.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
omicron-sha:
77
type: "string"
88
required: true
9+
testrail-upload:
10+
type: "boolean"
11+
require: false
12+
default: false
913
secrets:
1014
testrail-host:
1115
required: false
@@ -129,24 +133,24 @@ jobs:
129133
if [ -f ./acc-test-rerun.txt ]; then
130134
echo "::warning title=${{ github.job }} (${{ matrix.tf-binary }}) - test rerun::$(cat ./acc-test-rerun.txt)"
131135
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() && secrets.testrail-host != '' }}
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
150154
- name: upload logs
151155
if: always()
152156
continue-on-error: true

.github/workflows/build-test.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: build & test
22
on:
33
push:
4-
branches:
5-
- main
6-
- '[0-9].[0-9]+'
7-
- 'rel/v*'
4+
#branches:
5+
# - main
6+
# - '[0-9].[0-9]+'
7+
# - 'rel/v*'
88
pull_request:
99
schedule:
1010
# Cron jobs test against omicron main to catch breaking changes early.
@@ -65,7 +65,7 @@ jobs:
6565
if: matrix.tf-binary == 'terraform' # Linting tools require Terraform to be installed.
6666
run: make lint
6767
- name: upload test results to TestRail
68-
if: always()
68+
if: ${{ always() && github.event_name == 'workflow_dispatch' }}
6969
continue-on-error: true
7070
env:
7171
TR_CLI_HOST: ${{ secrets.TESTRAIL_HOST }}
@@ -171,6 +171,7 @@ jobs:
171171
with:
172172
omicron-sha: ${{ needs.omicron-version.outputs.sha }}
173173
secrets:
174+
testrail-upload: ${{ github.event_name == 'workflow_dispatch' }}
174175
testrail-host: ${{ secrets.TESTRAIL_HOST }}
175176
testrail-username: ${{ secrets.TESTRAIL_USERNAME }}
176177
testrail-api-key: ${{ secrets.TESTRAIL_API_KEY }}

0 commit comments

Comments
 (0)