Skip to content

Commit 51af66e

Browse files
authored
fix(fixtures): use the correct syntax while checking fixture results (#1099)
1 parent 729aa47 commit 51af66e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/actions/run-fixtures-test/action.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,24 @@ runs:
5151
working-directory: ${{ inputs.fixtures-dir }}
5252
env:
5353
IN_DATE_FORMAT: ${{ inputs.date-format }}
54+
shell: bash
5455
run: |
5556
if [ -f expected.md ]; then
5657
current_date=$(date +"$IN_DATE_FORMAT")
5758
sed -i "s/<<DATE>>/$current_date/g" expected.md
58-
if [ ! diff --strip-trailing-cr output.md expected.md ]; then
59+
if ! diff --strip-trailing-cr output.md expected.md; then
5960
echo "The generated changelog does not match the expected changelog."
6061
exit 1
6162
fi
6263
fi
63-
shell: bash
6464
6565
- name: Compare the return code with the expected return code
6666
working-directory: ${{ inputs.fixtures-dir }}
67+
shell: bash
6768
run: |
68-
if [ -f expected.rc ] && [ ! diff --skip-trailing-cr output.rc expected.rc ]; then
69-
echo "The return code does not match the expected return code."
70-
exit 1
69+
if [ -f expected.rc ]; then
70+
if ! diff --strip-trailing-cr output.rc expected.rc; then
71+
echo "The return code does not match the expected return code."
72+
exit 1
73+
fi
7174
fi
72-
shell: bash

0 commit comments

Comments
 (0)