new file: .forgejo/workflows/run-tests.sh
Some checks failed
Testing / test (push) Failing after 44s

modified:   .forgejo/workflows/test.yml
This commit is contained in:
Mrrp 2024-11-18 20:44:49 -08:00
parent ab50b172f6
commit cd75367045
2 changed files with 21 additions and 2 deletions

View file

@ -0,0 +1,19 @@
#!/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

View file

@ -25,7 +25,7 @@ jobs:
run: npm ci run: npm ci
- name: Run Unit tests - name: Run Unit tests
run: npm run test:unit run: ./.forgejo/workflows/run-tests.sh
- name: Run E2E tests - name: Run E2E tests
run: npm run test:e2e run: npm run test:e2e