Skip to content

Commit 6457033

Browse files
committed
Revert "fix: add ability to restart failed test"
This reverts commit decf5fe.
1 parent decf5fe commit 6457033

File tree

2 files changed

+22
-63
lines changed

2 files changed

+22
-63
lines changed

.github/workflows/e2e.yaml

Lines changed: 17 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ jobs:
101101

102102
# Run e2e tests
103103
e2e:
104+
outputs:
105+
status: ${{ steps.status.outputs.status }}
104106
needs: [ "token", "find-tf-releases", "list-examples" ]
105107
runs-on: k8s-large
106108
environment: default
@@ -178,23 +180,16 @@ jobs:
178180
azure_tenant_id: ${{ secrets.AZURE_TENANT_ID }}
179181
azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
180182

181-
- name: Save status
182-
if: always()
183+
- name: Mark error
184+
id: status
185+
if: failure()
183186
run: |
184-
JOB_ID="${{ matrix.test.name }}"
185-
STATUS=$([[ "${{ job.status }}" == "success" ]] && echo "pass" || echo "fail")
186-
mkdir -p status
187-
echo "$JOB_ID:$STATUS" > status/$JOB_ID.txt
188-
echo "Saved: $JOB_ID = $STATUS"
189-
190-
- name: Upload status
191-
if: always()
192-
uses: actions/upload-artifact@v4
193-
with:
194-
name: status-${{ matrix.test.name }}
195-
path: status/
187+
echo "status=failure" >> "${GITHUB_OUTPUT}"
188+
exit 1
196189
197190
upgrade:
191+
outputs:
192+
status: ${{ steps.status.outputs.status }}
198193
needs: [ "token", "find-tf-releases", "list-examples" ]
199194
runs-on: k8s-large
200195
environment: default
@@ -274,56 +269,20 @@ jobs:
274269
azure_tenant_id: ${{ secrets.AZURE_TENANT_ID }}
275270
azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
276271

277-
- name: Save status
278-
if: always()
279-
run: |
280-
JOB_ID="${{ matrix.test.name }}"
281-
STATUS=$([[ "${{ job.status }}" == "success" ]] && echo "pass" || echo "fail")
282-
mkdir -p status
283-
echo "$JOB_ID:$STATUS" > status/$JOB_ID.txt
284-
echo "Saved: $JOB_ID = $STATUS"
285-
286-
- name: Upload status
272+
- name: Mark error
287273
id: status
288-
if: always()
289-
uses: actions/upload-artifact@v4
290-
with:
291-
name: status-${{ matrix.test.name }}
292-
path: status/
274+
if: failure()
275+
run: |
276+
echo "status=failure" >> "${GITHUB_OUTPUT}"
277+
exit 1
293278
294279
report:
295280
runs-on: k8s-nano
296281
needs: [ "e2e", "upgrade" ]
297-
#if: ${{ github.ref_name == 'main' }}
282+
if: ${{ github.ref_name == 'main' && (needs.e2e.outputs.status == 'failure' || needs.upgrade.outputs.status == 'failure') }}
298283
steps:
299-
- name: Download all statuses
300-
uses: actions/download-artifact@v4
301-
with:
302-
pattern: status-*
303-
path: all-status/
304-
merge-multiple: true
305-
306-
- name: Check results
307-
run: |
308-
echo "=== Tests Results ==="
309-
FAILED_COUNT=0
310-
for file in all-status/*.txt; do
311-
if [ -f "$file" ]; then
312-
RESULT=$(cat "$file")
313-
echo " $RESULT"
314-
[[ "$RESULT" == *":fail" ]] && ((FAILED_COUNT++))
315-
fi
316-
done
317-
echo ""
318-
if [ $FAILED_COUNT -eq 0 ]; then
319-
echo "🟢 OK"
320-
echo "status=SUCCESS" >> $GITHUB_OUTPUT
321-
else
322-
echo "🔴 FAILED"
323-
echo "status=FAILED" >> $GITHUB_OUTPUT
324-
fi
325284
- name: Report Failure on slack
326-
if: ${{ github.ref_name == 'main' && steps.report.outputs.status == 'FAILED' }}
285+
if: ${{ github.ref_name == 'main' && (needs.e2e.outputs.status == 'failure' || needs.upgrade.outputs.status == 'failure') }}
327286
uses: ravsamhq/notify-slack-action@v2
328287
with:
329288
token: ${{ secrets.GITHUB_TOKEN }}
@@ -336,7 +295,7 @@ jobs:
336295
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
337296
- name: Report error on github UI
338297
run: |
339-
if [ "${{ steps.report.outputs.status }}" == 'FAILED' ]
298+
if [ "${{ needs.e2e.outputs.status }}" == 'failure' || needs.upgrade.outputs.status == 'failure' ]
340299
then
341300
exit 1
342301
fi

.github/workflows/release.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
id-token: write
108108
strategy:
109109
fail-fast: false
110-
max-parallel: 5
110+
max-parallel: 10
111111
matrix:
112112
tf_release: ${{ fromJSON(needs.find-tf-releases.outputs.releases) }}
113113
test: ${{ fromJSON(needs.list-examples.outputs.examples) }}
@@ -178,15 +178,15 @@ jobs:
178178
upgrade:
179179
outputs:
180180
status: ${{ steps.status.outputs.status }}
181-
needs: [ "validate", "token", "find-tf-releases", "list-examples"]
181+
needs: [ "validate", "token", "find-tf-releases", "list-examples", "e2e", "import" ]
182182
runs-on: k8s-large
183183
environment: default
184184
continue-on-error: true
185185
permissions:
186186
id-token: write
187187
strategy:
188188
fail-fast: false
189-
max-parallel: 5
189+
max-parallel: 10
190190
matrix:
191191
tf_release: ${{ fromJSON(needs.find-tf-releases.outputs.releases) }}
192192
test: ${{ fromJSON(needs.list-examples.outputs.examples) }}
@@ -258,14 +258,14 @@ jobs:
258258
import:
259259
outputs:
260260
status: ${{ steps.status.outputs.status }}
261-
needs: [ "token", "find-tf-releases"]
261+
needs: [ "token", "find-tf-releases" , "e2e"]
262262
runs-on: k8s-large
263263
continue-on-error: true
264264
permissions:
265265
id-token: write
266266
strategy:
267267
fail-fast: false
268-
max-parallel: 5
268+
max-parallel: 10
269269
matrix:
270270
tf_release: ${{ fromJSON(needs.find-tf-releases.outputs.releases) }}
271271
cloud_provider: [ "aws", "azure", "gcp" ]

0 commit comments

Comments
 (0)