Skip to content

Commit

Permalink
Ensure CircleCI script fails on Jest test errors
Browse files Browse the repository at this point in the history
- Added `set -e` to the CI script to exit immediately if any command returns a non-zero status.
- This change ensures that CircleCI will fail the build if errors are detected during Jest testing or any other command in the script.
  • Loading branch information
ChelseaKR committed Feb 10, 2024
1 parent a333670 commit 01ff002
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/test-all.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
#!/usr/bin/env bash

cd $(git rev-parse --show-toplevel)
# Exit immediately if a command exits with a non-zero status
set -e

# Change directory to the git repository root
cd $(git rev-parse --show-toplevel)

# Run linters
npm --prefix=frontend run lint
npm --prefix=backend run lint

# Run fence checks
npm --prefix=frontend run fences
npm --prefix=backend run fences

# Run Jest tests and ensure failure on error
npm --prefix=frontend run test:ci
npm --prefix=backend run test -- --no-cache


echo " _ _ _"
echo " | | | | | |"
echo " | |_ ___ ___| |_ ___ _ __ __ _ ___ ___| |"
Expand Down

0 comments on commit 01ff002

Please sign in to comment.