diff --git a/.gitignore b/.gitignore index 0fcc73c..1e5475d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ rasa-demo results.json report_main.json +.history \ No newline at end of file diff --git a/action.yml b/action.yml index 25a4257..1ece9fb 100644 --- a/action.yml +++ b/action.yml @@ -302,6 +302,15 @@ runs: OUTPUT="${OUTPUT}\n$(python3 ${{ github.action_path }}/scripts/cross_validation_results.py)" fi + if [[ -f "${{ inputs.workspace }}/${{ inputs.result_directory }}/failed_test_stories.yml" ]]; then + TEST_FAILED=$(grep 'None of the test stories failed' README.md > /dev/null; echo $?) + if [[ $TEST_FAILED -eq 0 ]]; then + OUTPUT="${OUTPUT}\n```yml\n$(cat ${{ inputs.workspace }}/${{ inputs.result_directory }}/failed_test_stories.yml)```" + else + OUTPUT="${OUTPUT}\n\n#$(cat ${{ inputs.workspace }}/${{ inputs.result_directory }}/failed_test_stories.yml)" + fi + fi + OUTPUT="${OUTPUT//$'\n'/'\n'}" curl -X POST -s -H "Authorization: token ${{ inputs.github_token }}" -H "Accept: application/vnd.github.v3+json" \ diff --git a/scripts/cross_validation_results.py b/scripts/cross_validation_results.py index a2d713b..1f8eb40 100644 --- a/scripts/cross_validation_results.py +++ b/scripts/cross_validation_results.py @@ -51,6 +51,7 @@ def entity_table(): cols = ["support", "f1-score", "precision", "recall"] writer.headers = ["entity"] + cols + data.pop("accuracy", None) classes = list(data.keys()) classes.sort(key=lambda x: data[x]["support"], reverse=True)