Skip to content

Commit

Permalink
Improved the ci
Browse files Browse the repository at this point in the history
  • Loading branch information
MohitMaliFtechiz committed Jun 28, 2023
1 parent 3bcbe64 commit fdd9ee1
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: ktlint-report
path: '**/build/reports/ktlint'
name: ktlint-report
path: '**/build/reports/ktlint'



Expand Down Expand Up @@ -140,22 +140,22 @@ jobs:
- name: Check Deprecated Code
run: |
if grep -q 'Deprecated' build_logs.txt; then
warnings=$(grep -n 'Deprecated' build_logs.txt)
twice_warnings=$(echo "$warnings" | cut -d ':' -f 2 | sort | uniq -d)
if [ -z "$twice_warnings" ]; then
echo "No deprecated warnings found."
warnings=$(grep -oE "'.*?' is deprecated" build_logs.txt | sed "s/'//g")
twice_warnings=$(echo "$warnings" | cut -d ':' -f 2 | sort | uniq -d)
if [ -z "$twice_warnings" ]; then
echo "No deprecated warnings found."
else
echo "The following deprecated warnings appear twice:"
while read -r warning; do
echo "- $warning"
done <<< "$twice_warnings"
echo "Deprecated code usages found in the project."
exit 1
fi
else
echo "The following deprecated warnings appear twice:"
while read -r warning; do
echo "- $warning"
done <<< "$twice_warnings"
echo "Exiting CI due to deprecated warnings."
exit 1
fi
else
echo "No deprecated code found."
fi
echo "No deprecated code found."
fi
- name: Upload APK as Artifacts
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit fdd9ee1

Please sign in to comment.