hub-site/.forgejo/workflows/run-tests.sh
SevenOfAces cd75367045
Some checks failed
Testing / test (push) Failing after 44s
new file: .forgejo/workflows/run-tests.sh
modified:   .forgejo/workflows/test.yml
2024-11-18 20:44:49 -08:00

19 lines
438 B
Bash

#!/bin/bash
# Run the tests and capture the output
npm run test:unit > test-output.log 2>&1
# Check if 'No tests found' is in the log
if grep -q 'No tests found' test-output.log; then
echo "No tests found. Exiting with status 0."
exit 0
else
# Check if the test run was successful
if [ $? -eq 0 ]; then
echo "Tests executed successfully."
exit 0
else
echo "Tests failed. Exiting with status 1."
exit 1
fi
fi