Skip to content

Commit

Permalink
Try treating lint failure as a success to test
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadxali committed Nov 19, 2024
1 parent 65cd05b commit af6f42c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Run ESLint
- name: Run ESLint (Expecting failure)
run: |
cd tests/react-ts
pnpm lint
if [ $? -eq 0 ]; then
echo "ESLint passed, which is unexpected. Marking this as a failure."
exit 1
lint_exit_code=$?
echo "The exit code of pnpm lint is: $lint_exit_code"
if [ $lint_exit_code -eq 0 ]; then
echo "ESLint passed, which is unexpected. Marking this as a failure."
exit 1
else
echo "ESLint failed, which is expected. Marking this as a success."
echo "ESLint failed, which is expected. Marking this as a success."
exit 0
fi

0 comments on commit af6f42c

Please sign in to comment.