Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
itislu committed Jul 29, 2024
1 parent ba20b8b commit 9e57fc8
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/actions/summary_test_result/action.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
# .github/actions/summary_test_result/action.yaml
name: Test Result Summary Action
description: Compares failed counts between source and target branches

inputs:
source_failed_count:
description: Number of failed test cases on source branch
required: true
target_failed_count:
description: Number of failed test cases on target branch
required: true
tester_output_dir:
description: Directory containing tester output files
required: true
scripts_dir:
description: Directory containing scripts
required: true

env

runs:
using: composite
steps:
# Requires SOURCE_FAILED_COUNT and TARGET_FAILED_COUNT environment variables
- name: 🆚 Compare failed count
id: comparison
run: |
echo -e "\e[93m🌱 SOURCE_FAILED_COUNT: $SOURCE_FAILED_COUNT\e[0m"
echo -e "\e[93m🌱 SOURCE_FAILED_COUNT: ${{ inputs.source_failed_count }}\e[0m"
echo -e "\e[94m🎯 TARGET_FAILED_COUNT: $TARGET_FAILED_COUNT\e[0m"
if [ $SOURCE_FAILED_COUNT -gt $TARGET_FAILED_COUNT ]; then
if [ ${{ inputs.source_failed_count }} -gt ${{ target_failed_count }} ]; then
echo -e "\e[1;31mSOURCE_FAILED_COUNT is greater than TARGET_FAILED_COUNT\e[0m"
exit 1
else
Expand All @@ -22,10 +38,10 @@ runs:
# Requires TESTER_OUTPUT_DIR environment variable
- name: 📈 Show the regressions between source and target branch
if: steps.comparison.outcome == 'failure'
run: ${{ env.SCRIPTS_DIR }}/print_changed_test_cases.sh
run: ${{ inputs.scripts_dir }}/print_changed_test_cases.sh
shell: bash
# Requires TESTER_OUTPUT_DIR environment variable
- name: 📉 Show the improvements between source and target branch
if: steps.comparison.outcome == 'success'
run: ${{ env.SCRIPTS_DIR }}/print_changed_test_cases.sh || true
run: ${{ inputs.scripts_dir }}/print_changed_test_cases.sh || true
shell: bash

0 comments on commit 9e57fc8

Please sign in to comment.