Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
effoeffi committed May 7, 2024
1 parent 2921332 commit 61d9395
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,3 @@ jobs:
revision: 'specs/revision-breaking.yaml'
output-to-file: 'breaking.txt'
fail-on: 'WARN'
- name: Test breaking changes action output
run: |
delimiter=$(cat /proc/sys/kernel/random/uuid | tr -d '-')
output=$(cat <<-$delimiter
${{ steps.test_breaking_changes.outputs.breaking }}
$delimiter
)
if [ "$output" != "1 breaking changes: 1 error, 0 warning" ]; then
echo "Expected output '1 breaking changes: 1 error, 0 warning' but got '$output'" >&2
exit 1
fi
- name: Test breaking changes action output to file
run: |
if [ ! -s breaking.txt ]; then
echo "Breaking changes file doesn't exist or is empty"
exit 1
fi
output=$(cat breaking.txt | head -n 1)
if [[ "${output}" != "1 breaking changes: 1 error, 0 warning" ]]; then
echo "Expected output '1 breaking changes: 1 error, 0 warning' but got '${output}'" >&2
exit 1
fi
2 changes: 1 addition & 1 deletion breaking/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ echo "$delimiter" >>"$GITHUB_OUTPUT"
# First output the changes (above) and then run oasdiff to check --fail-on
if [ -n "$fail_on" ]; then
flags="$flags --fail-on $fail_on"
oasdiff breaking "$base" "$revision" "$flags" > /dev/null
oasdiff breaking "$base" "$revision" $flags > /dev/null
fi

0 comments on commit 61d9395

Please sign in to comment.