mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-02-14 10:19:54 +00:00
chore(ci): regression test cursor feedback (#1938)
This commit is contained in:
74
.github/workflows/regression-test.yaml
vendored
74
.github/workflows/regression-test.yaml
vendored
@@ -131,7 +131,7 @@ jobs:
|
|||||||
--spec-type preflight
|
--spec-type preflight
|
||||||
|
|
||||||
- name: Upload test artifacts
|
- name: Upload test artifacts
|
||||||
if: always()
|
if: ${{ !cancelled() }}
|
||||||
uses: actions/upload-artifact@v5
|
uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: test-results-v1beta3-${{ github.run_id }}-${{ github.run_attempt }}
|
name: test-results-v1beta3-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
@@ -143,7 +143,7 @@ jobs:
|
|||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
- name: Set job outcome
|
- name: Set job outcome
|
||||||
if: always()
|
if: ${{ !cancelled() }}
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ steps.compare.outcome }}" == "failure" ] && [ "${{ steps.compare.outputs.baseline_missing }}" != "true" ]; then
|
if [ "${{ steps.compare.outcome }}" == "failure" ] && [ "${{ steps.compare.outputs.baseline_missing }}" != "true" ]; then
|
||||||
echo "comparison_failed=true" >> $GITHUB_OUTPUT
|
echo "comparison_failed=true" >> $GITHUB_OUTPUT
|
||||||
@@ -234,7 +234,7 @@ jobs:
|
|||||||
--spec-type preflight
|
--spec-type preflight
|
||||||
|
|
||||||
- name: Upload test artifacts
|
- name: Upload test artifacts
|
||||||
if: always()
|
if: ${{ !cancelled() }}
|
||||||
uses: actions/upload-artifact@v5
|
uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: test-results-v1beta2-${{ github.run_id }}-${{ github.run_attempt }}
|
name: test-results-v1beta2-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
@@ -246,7 +246,7 @@ jobs:
|
|||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
- name: Set job outcome
|
- name: Set job outcome
|
||||||
if: always()
|
if: ${{ !cancelled() }}
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ steps.compare.outcome }}" == "failure" ] && [ "${{ steps.compare.outputs.baseline_missing }}" != "true" ]; then
|
if [ "${{ steps.compare.outcome }}" == "failure" ] && [ "${{ steps.compare.outputs.baseline_missing }}" != "true" ]; then
|
||||||
echo "comparison_failed=true" >> $GITHUB_OUTPUT
|
echo "comparison_failed=true" >> $GITHUB_OUTPUT
|
||||||
@@ -334,7 +334,7 @@ jobs:
|
|||||||
--spec-type supportbundle
|
--spec-type supportbundle
|
||||||
|
|
||||||
- name: Upload test artifacts
|
- name: Upload test artifacts
|
||||||
if: always()
|
if: ${{ !cancelled() }}
|
||||||
uses: actions/upload-artifact@v5
|
uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: test-results-supportbundle-${{ github.run_id }}-${{ github.run_attempt }}
|
name: test-results-supportbundle-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
@@ -345,7 +345,7 @@ jobs:
|
|||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
- name: Set job outcome
|
- name: Set job outcome
|
||||||
if: always()
|
if: ${{ !cancelled() }}
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ steps.compare.outcome }}" == "failure" ] && [ "${{ steps.compare.outputs.baseline_missing }}" != "true" ]; then
|
if [ "${{ steps.compare.outcome }}" == "failure" ] && [ "${{ steps.compare.outputs.baseline_missing }}" != "true" ]; then
|
||||||
echo "comparison_failed=true" >> $GITHUB_OUTPUT
|
echo "comparison_failed=true" >> $GITHUB_OUTPUT
|
||||||
@@ -355,7 +355,7 @@ jobs:
|
|||||||
# Report results (runs after all tests complete)
|
# Report results (runs after all tests complete)
|
||||||
report-results:
|
report-results:
|
||||||
needs: [test-preflight-v1beta3, test-preflight-v1beta2, test-supportbundle]
|
needs: [test-preflight-v1beta3, test-preflight-v1beta2, test-supportbundle]
|
||||||
if: always() && github.actor != 'dependabot[bot]'
|
if: ${{ !cancelled() && github.actor != 'dependabot[bot]' }}
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
|
||||||
@@ -380,16 +380,38 @@ jobs:
|
|||||||
- name: Reorganize artifacts
|
- name: Reorganize artifacts
|
||||||
run: |
|
run: |
|
||||||
# Move artifacts from nested directories to test/output
|
# Move artifacts from nested directories to test/output
|
||||||
find test/output/test-results-* -type f -exec mv {} test/output/ \;
|
# Use shopt to handle glob patterns that don't match
|
||||||
|
shopt -s nullglob
|
||||||
|
for dir in test/output/test-results-*; do
|
||||||
|
if [ -d "$dir" ]; then
|
||||||
|
find "$dir" -type f -exec mv {} test/output/ \;
|
||||||
|
fi
|
||||||
|
done
|
||||||
# Clean up empty directories
|
# Clean up empty directories
|
||||||
find test/output/test-results-* -type d -empty -delete || true
|
for dir in test/output/test-results-*; do
|
||||||
|
if [ -d "$dir" ]; then
|
||||||
|
find "$dir" -type d -empty -delete || true
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
shopt -u nullglob
|
||||||
|
|
||||||
- name: Generate summary report
|
- name: Generate summary report
|
||||||
run: |
|
run: |
|
||||||
python3 scripts/generate_summary.py \
|
# Handle case where no reports exist
|
||||||
--reports test/output/diff-report-*.json \
|
shopt -s nullglob
|
||||||
--output-file $GITHUB_STEP_SUMMARY \
|
REPORTS=(test/output/diff-report-*.json)
|
||||||
--output-console
|
shopt -u nullglob
|
||||||
|
|
||||||
|
if [ ${#REPORTS[@]} -eq 0 ]; then
|
||||||
|
echo "⚠ No comparison reports found - test jobs may have failed before generating reports"
|
||||||
|
echo "## Summary Report" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "No comparison reports available. Check individual test job results." >> $GITHUB_STEP_SUMMARY
|
||||||
|
else
|
||||||
|
python3 scripts/generate_summary.py \
|
||||||
|
--reports test/output/diff-report-*.json \
|
||||||
|
--output-file $GITHUB_STEP_SUMMARY \
|
||||||
|
--output-console
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Check for regressions
|
- name: Check for regressions
|
||||||
run: |
|
run: |
|
||||||
@@ -397,18 +419,30 @@ jobs:
|
|||||||
|
|
||||||
FAILURES=0
|
FAILURES=0
|
||||||
|
|
||||||
if [ "${{ needs.test-preflight-v1beta3.result }}" == "failure" ]; then
|
if [ "${{ needs.test-preflight-v1beta3.result }}" == "failure" ] || [ "${{ needs.test-preflight-v1beta3.result }}" == "skipped" ]; then
|
||||||
echo "❌ v1beta3 comparison failed"
|
if [ "${{ needs.test-preflight-v1beta3.result }}" == "skipped" ]; then
|
||||||
|
echo "❌ v1beta3 test was skipped (likely due to build failure)"
|
||||||
|
else
|
||||||
|
echo "❌ v1beta3 comparison failed"
|
||||||
|
fi
|
||||||
FAILURES=$((FAILURES + 1))
|
FAILURES=$((FAILURES + 1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${{ needs.test-preflight-v1beta2.result }}" == "failure" ]; then
|
if [ "${{ needs.test-preflight-v1beta2.result }}" == "failure" ] || [ "${{ needs.test-preflight-v1beta2.result }}" == "skipped" ]; then
|
||||||
echo "❌ v1beta2 comparison failed"
|
if [ "${{ needs.test-preflight-v1beta2.result }}" == "skipped" ]; then
|
||||||
|
echo "❌ v1beta2 test was skipped (likely due to build failure)"
|
||||||
|
else
|
||||||
|
echo "❌ v1beta2 comparison failed"
|
||||||
|
fi
|
||||||
FAILURES=$((FAILURES + 1))
|
FAILURES=$((FAILURES + 1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${{ needs.test-supportbundle.result }}" == "failure" ]; then
|
if [ "${{ needs.test-supportbundle.result }}" == "failure" ] || [ "${{ needs.test-supportbundle.result }}" == "skipped" ]; then
|
||||||
echo "❌ Support bundle comparison failed"
|
if [ "${{ needs.test-supportbundle.result }}" == "skipped" ]; then
|
||||||
|
echo "❌ Support bundle test was skipped (likely due to build failure)"
|
||||||
|
else
|
||||||
|
echo "❌ Support bundle comparison failed"
|
||||||
|
fi
|
||||||
FAILURES=$((FAILURES + 1))
|
FAILURES=$((FAILURES + 1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -422,7 +456,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Update baselines
|
- name: Update baselines
|
||||||
if: github.event.inputs.update_baselines == 'true' && github.event_name == 'workflow_dispatch'
|
if: ${{ !cancelled() && github.event.inputs.update_baselines == 'true' && github.event_name == 'workflow_dispatch' }}
|
||||||
run: |
|
run: |
|
||||||
echo "Updating baselines with current bundles..."
|
echo "Updating baselines with current bundles..."
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user