Skip to content

Commit

Permalink
feat: Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jaironalves committed Jul 9, 2024
1 parent fec3d02 commit 01534f7
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 4 deletions.
37 changes: 34 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,44 @@ jobs:
# id: outputs
# run: echo "${{ toJson(steps.test-action.outputs) }}"

- name: Test Multiline Output
- name: Test Output Comment Line
id: test-output-comment-line
run: |
test_name="Test Output Comment Line"
expected_result="./app = "
output_result="${{ steps.test-action.outputs.action-test_comment-line }}"
echo "Expected Result:"
echo "$expected_result"
echo ""
echo "Output Result:"
echo "$output_result"
echo ""
if [[ "$output_result" == "$expected_result" ]]; then
echo "Test Passed: $test_name"
echo "### :white_check_mark: Test Passed: $test_name" >> $GITHUB_STEP_SUMMARY
else
echo "Test Failed: $test_name"
echo "### :x: Test Failed: $test_name" >> $GITHUB_STEP_SUMMARY
echo "Expected Result:" >> $GITHUB_STEP_SUMMARY
echo "$expected_result" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Output Result:" >> $GITHUB_STEP_SUMMARY
echo "$output_result" >> $GITHUB_STEP_SUMMARY
fi
- name: Test Output Multiline
id: test-output-multiline
run: |
test_name="Test Multiline Output"
test_name="Test Output Multiline"
expected_result=$(printf "%b" "### Heading\n\n* Bullet C:\\\\\\\\ E:\\\\\n* Driver D:\\\\\n* Points")
output_result="${{ steps.test-action.outputs.app-build_multiline }}"
output_result="${{ steps.test-action.outputs.action-test_multiline }}"
echo "Expected Result:"
echo "$expected_result"
Expand Down
12 changes: 11 additions & 1 deletion yq-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
action-test:
# comment
comment-line: ./app = #comment line
version: '9.x'
multiline: |
### Heading
* Bullet C:\\ E:\
* Driver D:\
* Points
app-build:
# comment
working-dir: ./app = #comment line
comment-line: ./app = #comment line
version: '9.x'
multiline: |
### Heading
Expand Down

0 comments on commit 01534f7

Please sign in to comment.